help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

menu entries missing display of equivalent keyboard sequence when functi


From: andrew . maguire
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

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 via email to

[Prev in Thread] Current Thread [Next in Thread]