Compare commits

..

2 commits

Author SHA1 Message Date
Benson Chu
42a896742c Don't care about casing! 2025-08-13 14:27:11 -05:00
Benson Chu
7b81c0a68c Use read-key on the terminal 2025-08-13 14:15:48 -05:00
2 changed files with 14 additions and 4 deletions

View file

@ -12,7 +12,7 @@
(define-derived-mode self-chat-mode fundamental-mode "self-chat"
"This is a mode where I become crazy and talk to myself."
(setq font-lock-defaults '(self-chat-highlights))
(setq font-lock-defaults '(self-chat-highlights nil t))
(olivetti-mode 1))
(defun self-chat-buffer ()
@ -148,10 +148,10 @@ shuffling is done in place."
"'s face for self-chat-mode"))
(defvar ,face-sym ',face-sym)
(add-to-list 'self-chat-highlights
'(,(rx symbol-start (literal name) symbol-end) 0 ,face-sym prepend)
t)
'(,(rx symbol-start (literal name) symbol-end) . ,face-sym))
(add-to-list 'self-chat-highlights
'(,(format "^> %s:.*$" name) . ,face-sym)))
'(,(format "^> %s:.*$" name) 0 ,face-sym keep)
t))
(cl-incf num))))
list))))

View file

@ -63,6 +63,16 @@
(xterm-mouse-mode 1)
(terminal-init-xterm)
(defun my/org--mks-read-key-use-read-key (orig &rest args)
(cl-letf (((symbol-function 'read-char-exclusive)
(lambda (&optional prompt inherit-input-method seconds)
(read-key prompt nil))))
(apply orig args)))
(advice-add #'org--mks-read-key
:around
#'my/org--mks-read-key-use-read-key)
;; (global-set-key (kbd "M-[ emacs-C-SPC") #'set-mark-command)
;; (global-set-key (kbd "M-[ emacs-M-SPC") #'cycle-spacing)
;; (global-set-key (kbd "M-[ emacs-C-/") #'undo)