Re: On keybindings and the slow erosion of help's utility
Ihor Radchenko <[email protected]> Sun, 02 Aug 2026 10:24:49 +0000
| Newsgroups | gmane.emacs.devel |
|---|---|
| Message-ID | <87qzkg7rc9.fsf@localhost> |
Eli Zaretskii <[email protected]> writes: >> The difference is that the "command" return value can resume the key >> lookup. If it returns nil, Emacs will continue key lookup in other >> keymaps. If it returns a keymap, Emacs will continue lookup in the >> returned keymap. Such things are currently not possible with command >> binding. > > Sorry, I'm not following. A command can definitely perform look up in > any keymaps it wants, and do whatever it wants with what it finds > there, including calling the bindings it finds there. What are the > advantages of doing that under Emacs's control instead of under the > control of a command? Let's consider a simple case. We want to bind C-k in foo-mode-map but only on specific lines in file. When the point is elsewhere, we just want Emacs to call whatever is bound to C-k as if C-k in foo-mode-map were not bound at all. How would you do it with a command? -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>