GNU bug report logs - #14084
24.3.50; `substitute-command-keys': allow for expansion of <remap>...

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Fri, 29 Mar 2013 05:20:02 UTC

Severity: wishlist

Tags: moreinfo

Found in version 24.3.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 14084 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 14084 <at> debbugs.gnu.org
Subject: Re: bug#14084: 24.3.50; `substitute-command-keys': allow for
 expansion of <remap>...
Date: Tue, 10 May 2022 15:13:54 +0200
"Drew Adams" <drew.adams <at> 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




This bug report was last modified 2 years and 351 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.