unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* menu entries missing display of equivalent keyboard sequence when function keys are used as prefix keys
@ 2003-01-10 19:23 andrew.maguire
  0 siblings, 0 replies; 2+ messages in thread
From: andrew.maguire @ 2003-01-10 19:23 UTC (permalink / 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

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

* Re: menu entries missing display of equivalent keyboard sequence when function keys are used as prefix keys
       [not found] <mailman.151.1042226843.21513.help-gnu-emacs@gnu.org>
@ 2003-01-11  2:05 ` Jesper Harder
  0 siblings, 0 replies; 2+ messages in thread
From: Jesper Harder @ 2003-01-11  2:05 UTC (permalink / raw)


andrew.maguire@ps.ge.com writes:

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

Try using `easy-menu-define' et al. instead -- they're much more
convenient for creating menus.

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

end of thread, other threads:[~2003-01-11  2:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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
2003-01-10 19:23 andrew.maguire

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).