Using easymenu for a global menu, possible?

Mats Lidell matsl at xemacs.org
Sun Dec 17 18:04:46 EST 2006


Hi,

I have been experimenting with using easymenu for a global menu. I
don't know if that is the right term but it is a menu that is always
there in the same way as "File", "Edit" etc. Since I want the code to
work in both Emacsen I though easymenu would be my best bet.

A sample code could be:

    (require 'easymenu)
    (defconst my-menu (list "My-Menu" '["Do something" (message "done") t]))
    (easy-menu-define my-menu nil nil my-menu)
    (easy-menu-add my-menu)

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?

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.

So is it possible to use easymenu for this or need I go to the native
menu systems for each Emacsen to do it?

Yours
-- 
%% Mats




More information about the XEmacs-Beta mailing list