Undo kkp tab and return decoding

This commit is contained in:
Alexander Rosenberg 2024-12-09 23:09:36 -08:00
parent 535dc0313e
commit 5c3c492fd8
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

28
init.el
View File

@ -381,18 +381,18 @@ directory. Otherwise, run `find-file' on that file."
:defer nil :defer nil
:config :config
(global-kkp-mode 1) (global-kkp-mode 1)
(defun my/-kkp-after-terminal-setup () ;; (defun my/-kkp-after-terminal-setup ()
;; Make tab and backtab work properly ;; ;; Make tab and backtab work properly
(define-key input-decode-map [(control ?i)] [tab]) ;; (define-key input-decode-map [(control ?i)] [tab])
(define-key input-decode-map [(control ?I)] [backtab]) ;; (define-key input-decode-map [(control ?I)] [backtab])
(define-key input-decode-map [(control ?m)] [return])) ;; (define-key input-decode-map [(control ?m)] [return]))
(defun my/-kkp-after-terminal-teardown (term) ;; (defun my/-kkp-after-terminal-teardown (term)
(with-selected-frame (car (frames-on-display-list term)) ;; (with-selected-frame (car (frames-on-display-list term))
(define-key input-decode-map [(control ?i)] nil t) ;; (define-key input-decode-map [(control ?i)] nil t)
(define-key input-decode-map [(control ?I)] nil t) ;; (define-key input-decode-map [(control ?I)] nil t)
(define-key input-decode-map [(control ?m)] nil t))) ;; (define-key input-decode-map [(control ?m)] nil t)))
(advice-add 'kkp--terminal-setup :after 'my/-kkp-after-terminal-setup) ;; (advice-add 'kkp--terminal-setup :after 'my/-kkp-after-terminal-setup)
(advice-add 'kkp--terminal-teardown :after 'my/-kkp-after-terminal-teardown) ;; (advice-add 'kkp--terminal-teardown :after 'my/-kkp-after-terminal-teardown)
(defun my/quoted-insert (arg) (defun my/quoted-insert (arg)
"Insert the next character using read-key, not read-char." "Insert the next character using read-key, not read-char."
(interactive "*p") (interactive "*p")
@ -632,7 +632,9 @@ in the region and indents once)."
'lisp-dedent-adjust-parens) 'lisp-dedent-adjust-parens)
(evil-define-key '(normal visual) adjust-parens-mode-map (evil-define-key '(normal visual) adjust-parens-mode-map
(kbd "<tab>") #'my/lisp-indent-adjust-parens (kbd "<tab>") #'my/lisp-indent-adjust-parens
(kbd "<backtab>") #'my/lisp-dedent-adjust-parens)) (kbd "<backtab>") #'my/lisp-dedent-adjust-parens
(kbd "C-c C-i") #'my/lisp-indent-adjust-parens
(kbd "C-c S-<tab>") #'my/lisp-dedent-adjust-parens))
;; for when the files are just too large ;; for when the files are just too large
(use-package vlf (use-package vlf