unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: andrew.maguire@ps.ge.com
Subject: menu entries missing display of equivalent keyboard sequence when function keys are used as prefix keys
Date: Fri, 10 Jan 2003 14:23:23 -0500	[thread overview]
Message-ID: <6192367D59F8904CA553579EF41FEEA03E4D14@ukcbgx01psge.geips.ge.com> (raw)

The following code defines a simple function and creates a
keyboard shortcut, F8 d, to execute it. It then also creates 
a menu, Andrew, and adds an entry, My function, to this menu.

On Emacs 20.7 (Unix and Windows), the Menu entry correctly has the
keyboard short cut listed but Emacs 21.2 (Unix and Windows) it does not.
It seems to be only when function keys are defined to be prefix keys.
I presume that there is something different in the process that
automatically
sets up the keyboard shortcut entries.

I have submitted this to gnu.emacs.bug but I just wondered if anyone on this
mailing list can help? 

(defun andrew-fn ()
"Test"
(interactive)
(message "Hello"))


(progn
  (setq andrew-map (make-sparse-keymap "Andrew"))
  (put 'andrew-fn 'menu-enable t)
  (define-key andrew-map [andrew-function] '("My function" . andrew-fn))
  (define-key global-map [menu-bar andrew] andrew-map)
  (define-key-after (lookup-key global-map [menu-bar]) [andrew]
    (cons "Andrew" andrew-map) 'dev)
  (setq f8-map (make-sparse-keymap))
  (fset 'f8-map f8-map)
  (define-key f8-map "d" 'andrew-fn)
  (define-key global-map [f8] 'f8-map)
)

Thanks,
Andrew

             reply	other threads:[~2003-01-10 19:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-10 19:23 andrew.maguire [this message]
     [not found] <mailman.151.1042226843.21513.help-gnu-emacs@gnu.org>
2003-01-11  2:05 ` menu entries missing display of equivalent keyboard sequence when function keys are used as prefix keys Jesper Harder

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=6192367D59F8904CA553579EF41FEEA03E4D14@ukcbgx01psge.geips.ge.com \
    --to=andrew.maguire@ps.ge.com \
    /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.
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).