unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* menu indications of key bindings for remapped commands
@ 2007-01-10 22:24 Drew Adams
  2007-01-10 23:37 ` Stefan Monnier
  2007-01-11  9:42 ` Kim F. Storm
  0 siblings, 2 replies; 13+ messages in thread
From: Drew Adams @ 2007-01-10 22:24 UTC (permalink / raw)


What is the reason that a remapped command in a menu item has its key
binding listed as, for example, "(<remap> <switch-to-buffer>)"? Is it
because it would be impossible or difficult to pick up one of the final keys
that it is actually bound to - e.g. "(C-x b)"?

I assume this is not an oversight or a bug - I'm just curious as to why this
appears this way. It is not especially useful for users to see this, IMO.

^ permalink raw reply	[flat|nested] 13+ messages in thread
[parent not found: <EIENLHALHGIMHGDOLMIMMEEFCOAA.drew.adams@oracle.com>]
* menu indications of key bindings for remapped commands
@ 2007-01-11 18:32 Drew Adams
  2007-01-11 21:33 ` Kim F. Storm
  0 siblings, 1 reply; 13+ messages in thread
From: Drew Adams @ 2007-01-11 18:32 UTC (permalink / raw)


I guess this whole message got rejected when the GIF attachment was deemed
"bad". Here it is again, without the attachment (see PNG sent separately).

From: Drew Adams Sent: Thursday, January 11, 2007 10:05 AM

> > What is the reason that a remapped command in a menu item has its key
> > binding listed as, for example, "(<remap> <switch-to-buffer>)"? Is it
> > because it would be impossible or difficult to pick up one of
> > the final keys that it is actually bound to - e.g. "(C-x b)"?
> >
> > I assume this is not an oversight or a bug - I'm just curious
> > as to why this appears this way. It is not especially useful for
> > users to see this, IMO.
>
> I don't see it.  And I have several remapped commands (from ido-mode).

See attached image.

> Can you please give a specific example/recipe of this.

The code is here: http://www.emacswiki.org/cgi-bin/wiki/icicles-mode.el.

The relevant code creating the first menu item is this:

(setq icicle-mode-map (make-sparse-keymap))
(unless icicle-menu-map
  (setq icicle-menu-map (make-sparse-keymap "Icicles"))
  (define-key icicle-mode-map [menu-bar icicles]
              (cons "Icicles" icicle-menu-map)))
(define-key icicle-menu-map [icicle-buffer]
            '("+ Switch to Buffer..." . icicle-buffer)))

The code that does the remapping for the first menu item is this:

(define-key icicle-mode-map [remap switch-to-buffer]
            'icicle-buffer)

The Icicles menubar menu is available whenever global minor mode
`icicle-mode' is turned on. In that minor mode, `switch-to-buffer' is
remapped to `icicle-buffer'. In the Icicles menu, that binding is indicated
as "(<remap> <switch-to-buffer>)".

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-05-24 21:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-10 22:24 menu indications of key bindings for remapped commands Drew Adams
2007-01-10 23:37 ` Stefan Monnier
2007-01-13  5:49   ` Drew Adams
2007-01-14  1:56     ` Richard Stallman
2007-01-22 19:44       ` Drew Adams
2007-05-20 23:54         ` Drew Adams
2007-05-24 21:22           ` Richard Stallman
2007-01-11  9:42 ` Kim F. Storm
     [not found] <EIENLHALHGIMHGDOLMIMMEEFCOAA.drew.adams@oracle.com>
2007-01-11 18:15 ` Drew Adams
2007-01-11 21:29   ` Kim F. Storm
2007-01-12  2:06     ` Drew Adams
  -- strict thread matches above, loose matches on Subject: below --
2007-01-11 18:32 Drew Adams
2007-01-11 21:33 ` Kim F. Storm

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).