Tomas Nordin wrote: > Dmitry Alexandrov writes: >> I am not sure, what ‘dummy’ is supposed to mean here? Minor mode is fully functional, that is you are free to disable and reenable it at will: > > I think I sort of tried to be funny, based on that the mode was made up just to keep a key binding available in all situations. No, itʼs not required there, you are free to enable ‘my-precious-keys-map’ unconditionally as well: (add-to-list 'emulation-mode-map-alists (list (cons t my-precious-keys-map))) if you feel that you will never need to suspend it. > And that the trickery with the key-maps is hard to follow for me. There is no any trickery, just a hardcoded priority order in Emacs itself: global map is overridden by major mode map, which in turn is overridden by minor mode maps, which can be overridden by emulation mode maps. That is, using a minor mode map would suffice in your specific case — about M-o in diff-mode. But so would a mere: (with-eval-after-load 'diff-mode (define-key diff-mode-map (kbd "M-o") nil)) ; also on RET, o, C-c C-c, which is more than enough > I got the impression that it sufficed to evaluate the forms, I mean, I didn't say, M-x my-precious-keys-mode . >>>> (define-minor-mode my-precious-keys-mode "" t) | (define-minor-mode MODE DOC &optional INIT-VALUE LIGHTER KEYMAP &rest BODY) | | ‹…› | | Optional INIT-VALUE is the initial value of the mode’s variable.