-
Notifications
You must be signed in to change notification settings - Fork 7
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
Not recognizing prefix keys #6
Comments
The problem seems to be with handling a symbol whose function definition is a keymap. This is allowed, according to the Elisp manual. A minimal working example: (defvar ctl-x-ctl-t-map
(let ((map (make-sparse-keymap)))
(define-key map "b" #'helm-mini)
(define-key map "f" #'helm-find-files)
map))
(fset 'ctl-x-ctl-t-map ctl-x-ctl-t-map)
(defvar test-keymap-mode-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "C-x C-t") 'ctl-x-ctl-t-map)
map))
(define-derived-mode test-keymap-mode prog-mode "TestKeymap") |
See issued for [`makey`](mickeynp/makey#6).
Nice one, @xiongtx -- I don't think I've ever seen this use case before. Can you recommend a fix? |
I'm not sure whether What's the intended usage of |
It's a good question, really. Its main purpose originally was as a proof-of-concept to show that Magit's excellent popup system had value outside of Magit itself. Both hydra and now the magit project have their own versions, though I do not think either of them support let-binding variables in the interface like makey does. I'm torn on whether it should support this and really want to leave it up to you: if it's easier to fix it in discover-my-major then that's fine with me -- if it's easier to do in makey then that is also fine if it preserves backwards compatibility. |
Expected behavior
Calling
(makey-key-mode-build-keymap 'clojure-mode)
should return a keymap.Actual behavior
Calling
(makey-key-mode-build-keymap 'clojure-mode)
gives the following error:C-c C-r
is bound to a keymap, so it should be considered a prefix key.makey-key-mode-options-for-clojure-mode
even acknowledges it as such.Steps to reproduce the problem
clojure-mode
(makey-key-mode-build-keymap 'clojure-mode)
Operating system
Darwin C02RW05YFVH6 15.6.0 Darwin Kernel Version 15.6.0
The text was updated successfully, but these errors were encountered: