Mats Lidell writes:
(require 'easymenu)
(defconst my-menu (list "My-Menu" '["Do something" (message
"done") t]))
(easy-menu-define my-menu nil nil my-menu)
Is the syntax correct? The second argument presumably should be a
list of places to install the menu. Or does nil there mean the
menubar?
Now this do introduce a menu, "My-Menu", in the
current-menubar, but
that is it. It is only in the current-menubar. How do I make it stick
when I change buffer? Should some hook be used that introduce the
menu everywhere?
You need to add it to all menubars that you want it to be in.
`current-menubar' is not a "real" menubar in the sense that it is
likely to be buffer-local, as you've observed. What you probably want
to do is to add it to `default-menubar', instead.
As an addition to the menubar menu a pop-up menu,
"My-Menu", is
defined. This is not what I want since it interferes with, changes,
the standard popup menu for modes. I want a menubar only menu.
Sounds to me like easymenu is broken by design (or maybe only by
default). However, as I read the docstrings, easymenu is supposed to
behave as you observe (except for the popup menu, which isn't
mentioned, although that may be related to the MAPS argument of
`easy-menu-define').
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta