* Re: [h-e-w] easymenu question (fwd)
@ 2010-08-14 16:49 Morgan V. Cundiff
0 siblings, 0 replies; 2+ messages in thread
From: Morgan V. Cundiff @ 2010-08-14 16:49 UTC (permalink / raw
To: help-gnu-emacs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=X-UNKNOWN, Size: 1138 bytes --]
---------- Forwarded message ----------
Date: Sat, 14 Aug 2010 18:35:55 +0200
From: Lennart Borgman <lennart.borgman@gmail.com>
To: Morgan V. Cundiff <mcundiff@loc.gov>
Subject: Re: [h-e-w] easymenu question
This is not specific to MS Windows, please send it to help-gnu-emacs.
On Sat, Aug 14, 2010 at 6:14 PM, Morgan V. Cundiff <mcundiff@loc.gov> wrote:
>
> 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"
> '("XQuery" :visible (string= major-mode
> "xquery-mode")
> ["xquery decl" insert-decl t]
> ("Sub Menu"
> ["My subentry" my-obscure-function t])))
>
> Thanks,
> Morgan
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [h-e-w] easymenu question (fwd)
[not found] <mailman.11.1281964155.16681.help-gnu-emacs@gnu.org>
@ 2010-08-16 14:09 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2010-08-16 14:09 UTC (permalink / raw
To: help-gnu-emacs
>> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-16 14:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.11.1281964155.16681.help-gnu-emacs@gnu.org>
2010-08-16 14:09 ` [h-e-w] easymenu question (fwd) Stefan Monnier
2010-08-14 16:49 Morgan V. Cundiff
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.