emacs-devel
[Top][All Lists]
Advanced

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

Re: menu-bar-map variable


From: Nick Roberts
Subject: Re: menu-bar-map variable
Date: Sun, 1 Apr 2007 21:11:16 +1200

Richard Stallman writes:
 >      > There is a feature by which a minor mode can turn off specific global
 >      > menu items.  It should be in the manual.
 > 
 >     Unfortunately tmm-menubar-mouse doesn't seem to work with this feature
 >     (items that are no longer visible get selected).
 > 
 > Can someone fix this?

I can localise the problem to tmm-get-keybind and these two lines:

 (setq allbind (cons (local-key-binding keyseq) allbind))
 (setq allbind (cons (global-key-binding keyseq) allbind))

If I remove a menu-item in the global map e.g file

(define-key global-map [menu-bar file] 'undefined)

the tmm handles this properly as the entry is removed from
(global-key-binding [menu-bar]):

(keymap (file . undefined)...

However, if I remove a menu-item in the local map, e.g, edit in the scratch
buffer:

(define-key lisp-interaction-mode-map [menu-bar edit] 'undefined)

then I get:

(local-key-binding [menu-bar])
(keymap (edit . undefined))

but tmm still thinks it's there because it's still in the global list

(global-key-binding [menu-bar]):

...(edit "Edit" keymap (undo ...
          ^^^^

Perhaps Emacs has it's own function to handle this.

There is no corresponding problem with a graphical display.

-- 
Nick                                           http://www.inet.net.nz/~nickrob




reply via email to

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