bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14084: 24.3.50; `substitute-command-keys': allow for expansion of <r


From: Lars Ingebrigtsen
Subject: bug#14084: 24.3.50; `substitute-command-keys': allow for expansion of <remap>...
Date: Tue, 10 May 2022 15:13:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

"Drew Adams" <drew.adams@oracle.com> writes:

> In a particular mode, suppose code remaps a command, such as
> `reposition-window', to a command `foo'.  `substitute-command-keys'
> shows that fact only this way:
>
>  <remap> <reposition-window>     foo
>
> That can be good information to show users, provided the currently
> active bindings of `reposition-window' are known to them.  If not, it
> just obscures things.

This information is displayed in different ways in different contexts.
With this test case:

(keymap-local-set "C-c c" #'foo)

(keymap-local-set "<remap> <foo>" #'bar)

(defun foo ()
  (interactive)
  "Call with \\[foo]."
  (message "foo"))

(defun bar ()
  (interactive)
  "Call with \\[foo]."
  (message "bar"))

C-h b (for instance) says

<remap> <foo>   bar
C-c c           foo

while C-h f foo RET says

Its keys are remapped to ‘bar’.  Without this remapping, it would be
bound to C-c c.

I think the `C-h b' output could perhaps be reorganised, because bar and
foo frequently are displayed far apart, so the person looking for the
key for bar would have to look around.

We could, for instance, add an extra line here.

But did you have other contexts in mind?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]