Compare commits

...

7 commits

Author SHA1 Message Date
Benson Chu
79f776ab63 Oops, that's the correct modifyOtherKeys=2 syntax 2025-08-12 09:52:10 -05:00
Benson Chu
87e696e61b Widen definition of llvm dump file 2025-08-12 09:51:58 -05:00
Benson Chu
187713fc4a Step forwards and backwards through print IR 2025-08-12 09:51:44 -05:00
Benson Chu
7ff5c97122 INFINITE KNOWLEDGE, prepend discovered 2025-08-12 09:50:17 -05:00
Benson Chu
909e194396 Well, that should be all... 2025-08-12 09:49:54 -05:00
Benson Chu
7fcb4b7754 Alright stop doing that 2025-08-12 09:49:43 -05:00
Benson Chu
d2a83b2e27 Feels gooood 2025-08-12 09:05:49 -05:00
3 changed files with 41 additions and 4 deletions

View file

@ -29,8 +29,8 @@
'((assembly :key ?a :major-mode asm-mode :buffer-string "assembly" :description "[a]ssembly")))
(defun ll/is-dump-file (fname)
(and (string= "/tmp/"
(file-name-directory fname))
(and (string-match-p (rx line-start "/tmp/")
(file-name-directory fname))
(string-match-p (rx "/" (+ (not "/")) "-" (= 6 alphanumeric) "." (+ anything))
fname)))

View file

@ -44,8 +44,22 @@
(add-to-list 'llvm-font-lock-keywords
`(,(regexp-opt '("nnan" "ninf" "nsz" "arcp" "contract" "afn" "reassoc" "fast") 'symbols) . 'shadow)))
(defvar llvm-ir-dump-regexp
(rx line-start (optional (any "#;") " ") "*** IR Dump" (+ nonl) "***" (optional ":") "\n"))
(add-to-list 'llvm-font-lock-keywords
`(,(rx line-start (optional (any "#;") " ") "***" (+ nonl) "***" (optional ":") "\n") . 'llvm-separator-face))
`(,llvm-ir-dump-regexp 0 'llvm-separator-face prepend))
(defun llvm-previous-IR-dump ()
(interactive)
(re-search-backward llvm-ir-dump-regexp))
(defun llvm-next-IR-dump ()
(interactive)
(re-search-forward llvm-ir-dump-regexp))
(define-key llvm-mode-map (kbd "C-M-a") #'llvm-previous-IR-dump)
(define-key llvm-mode-map (kbd "C-M-e") #'llvm-next-IR-dump)
(-->
"\\b[-]?[0-9]+\\b"

View file

@ -25,7 +25,30 @@
;;; Code:
(require 'term/xterm)
(xterm--init-modify-other-keys)
(let ((ascii-start 97))
(dotimes (n 26)
(define-key xterm-function-map
(format "\e[27;5;%d~" (+ ascii-start n))
(vector (1+ n)))))
(define-key xterm-function-map
"\e[27;5;8~"
[C-backspace])
(define-key xterm-function-map
"\e[27;5;32~"
[?\C-\s] ;; Or (kbd "C-SPC") ;; Or [?\C- ]
)
(define-key xterm-function-map
"\e[32;2;32~"
[?\S-\s])
;; (xterm--init-modify-other-keys)
(send-string-to-terminal "\e[>4;2m")
(push "\e[>4m" (terminal-parameter nil 'tty-mode-reset-strings))
(push "\e[>4;2m" (terminal-parameter nil 'tty-mode-set-strings))
(xterm-mouse-mode 1)