unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
To: emacs-devel@gnu.org
Cc: Drew Adams <drew.adams@oracle.com>
Subject: Re: menu indications of key bindings for remapped commands
Date: Thu, 24 May 2007 17:22:49 -0400	[thread overview]
Message-ID: <E1HrKll-0002uO-KZ@fencepost.gnu.org> (raw)
In-Reply-To: <EIENLHALHGIMHGDOLMIMMEKMDBAA.drew.adams@oracle.com>

Would someone please fix this and ack?

> Try this in emacs -Q
>
> (defvar bar-mode-map (make-sparse-keymap)
>   "Keymap for Bar mode.")
> (defvar bar-menu-map (make-sparse-keymap "Bar")
>   "Keymap for Bar menu.")
>
> (define-key bar-mode-map [menu-bar bar]
>   (cons "Bar" bar-menu-map))
> (define-key bar-mode-map [remap switch-to-buffer]
>   'bar-buffer)
>
> ;; This way, the key binding shows incorrectly in the menu.
> (define-key bar-menu-map [bar-buffer]
>   '("Bar Buffer..." . bar-buffer))
>
> ;; This way, the key binding shows correctly in the menu.
> ;;(define-key bar-menu-map [bar-buffer]
> ;;  '("Bar Buffer..." . switch-to-buffer))
>
> (define-minor-mode bar-mode "Bar mode")
>
> M-x bar-mode
>
> You'll see the bad menu item (bad key-binding description) in menu Bar.
>
> Now execute the commented code. The menu item is now as it should be.

  reply	other threads:[~2007-05-24 21:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1HrKll-0002uO-KZ@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).