summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-11-25 11:35:43 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-11-25 11:36:18 -0700
commit03a46b352842a2b77cc7f2a159eb794d1079bc00 (patch)
tree16661776548956ffcdceeddc92d1cd17b36c89f2
parent4aa416cec8d966ffe1ad5a78cd3a2b365982ab53 (diff)
downloaddotfiles-03a46b352842a2b77cc7f2a159eb794d1079bc00.tar.gz
prevent diff-mode-map overriding my M-<digit> bindings
-rw-r--r--.emacs.d/init.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 0c05d204..03098706 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -974,6 +974,11 @@ To be used only when it seems to be necessary."
(global-set-key [?\C--] nil)
(global-set-key [?\C-\M--] nil)
+(with-eval-after-load 'diff-mode
+ (cl-loop with map = (lookup-key diff-mode-map "\e")
+ for i from ?0 to ?9
+ do (define-key map (char-to-string i) nil)))
+
;; Similarly, we cannot reliably distinguish <C-backspace> from <backspace>.
;; Many terminal emulators send ^? for <backspace> and ^H for <C-backspace>,
;; or the other way around, but not all of them. Firefox binds <C-backspace>