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

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

Re: [h-e-w] easymenu question (fwd)


From: Stefan Monnier
Subject: Re: [h-e-w] easymenu question (fwd)
Date: Wed, 08 Dec 2010 15:25:08 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>> I am using easymenu.el to create major-mode-specific menus. The following
>> code in my .emacs does create the desired "XQuery" menu. However, it
>> positions the XQuery menu as the first (i.e. left-most) menu. I would like
>> to be able to position it as the right-most, or, better yet, to place it
>> in any arbitrary position relative to the other menus. Can anyone help?
>> 
>>   (easy-menu-define my-menu global-map "XQUERY"

The above line places the menu in the global-map.  I.e. it will appear
in every buffer, no matter which major mode it is in (so if you want it
to be major-mode-specific, it's probably not the right thing to do).

The place where it appears is partly controllable, but not completely:
it largely depends on whether it comes from global-map, from the
major-mode map, or from a minor-mode map.  Within those strong
constraints you can influence the position by controlling where in the
global-map, major-mode map, or minor-mode map they appear (typically
via the use of define-key-after or easy-menu-add-item), as well as via
menu-bar-final-items.


        Stefan


reply via email to

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