New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bind-key*
doesn't actually override everything
#1042
Comments
e.g., this works: (unless overriding-terminal-local-map
(setq overriding-terminal-local-map (make-sparse-keymap)))
(define-key overriding-terminal-local-map [(control return)] 'other-window) |
Egh, but |
Did you find out more here? What is the issue you are seeing and how can I reproduce it? |
Sorry, everything I know, which isn't much, is captured here |
That link is giving me "404 Not Found". |
Sorry, that repo is private for stupid reasons. The code in question is: ;; Prepare the keymap for my globally-overriding bindings.
(unless overriding-terminal-local-map
(setq overriding-terminal-local-map (make-sparse-keymap)))
(defmacro dwa/global-key (key-name command &optional predicate)
"Bind KEY-NAME to COMMAND in a way that's hard to override.
Forwards its arguments to `bind-key*', which see."
`(progn
(bind-key ,key-name ,command overriding-terminal-local-map ,predicate)
;; the above works for a while, but then overriding-terminal-local-map gets stomped on,
;; so add insurance with `bind-key*', which is imperfect (Magit overrides it).
(bind-key* ,key-name ,command ,predicate))) And note that it doesn't really work very well. |
Apparently you need to use
overriding-terminal-local-map
to achieve that.The text was updated successfully, but these errors were encountered: