Re: On keybindings and the slow erosion of help's utility

Eli Zaretskii <[email protected]> Sun, 02 Aug 2026 14:05:08 +0300
Newsgroups gmane.emacs.devel
Message-ID <[email protected]>
> From: Ihor Radchenko <[email protected]>
> Cc: [email protected], [email protected], [email protected]
> Date: Sun, 02 Aug 2026 10:46:38 +0000
> 
> Eli Zaretskii <[email protected]> writes:
> 
> >> 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?
> >
> > The command would test if point is on one of those specific lines, and
> > if not, call the binding of C-k in the "next" keymap in effect in the
> > buffer.
> 
> How to determine "next" keymap?

Using the functions described in "(elisp) Functions for Key Look up".

Basically, using the same methods as you intended this new feature to
use "to call whatever is bound to C-k as if C-k in foo-mode-map were
not bound at all".  If Emacs can do that, so can a Lisp program, or
what am I missing?