From 03a46b352842a2b77cc7f2a159eb794d1079bc00 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 25 Nov 2022 11:35:43 -0700 Subject: prevent diff-mode-map overriding my M- bindings --- .emacs.d/init.el | 5 +++++ 1 file changed, 5 insertions(+) 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 from . ;; Many terminal emulators send ^? for and ^H for , ;; or the other way around, but not all of them. Firefox binds -- cgit v1.2.3