[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [h-e-w] How to add to a menu
From: |
Underwood, Jonathan |
Subject: |
RE: [h-e-w] How to add to a menu |
Date: |
Thu, 23 Jan 2003 12:38:28 -0500 |
I tend to use the easy-menu package (easymenu.el, comes with emacs), an
example of adding a new menu to the main menubar is given below. Hope that
helps.
jonathan.
(easy-menu-add-item
nil nil
(easy-menu-create-menu
"w32-shell"
'(
["Use bash for shell commands" toggle-implicit-shell
:style toggle
:selected (eq shell-flag t)
:help "Use cygwin bash shell for shell comands"
:active t]
["Use cmd for shell commands" toggle-implicit-shell
:style toggle
:selected (eq shell-flag nil)
:help "Use cmd shell for shell comands"
:active t]
["Add cygwin-bin-dir to path" toggle-cygwin-bin-in-path
:style toggle
:selected (eq cygwin-bin-in-path-flag t)
:help "Adds cygwin-bin-dir to PATH"
:active t]
)))
> -----Original Message-----
> From: Neil Mackie [mailto:address@hidden
> Sent: January 23, 2003 10:59 AM
> To: address@hidden
> Subject: [h-e-w] How to add to a menu
>
>
> For a long time with Xemacs I used to add a 'print' option to
> the 'file' menu with
> (add-menu-item '("File") "Print Buffer with faces"
> 'ps-print-buffer-with-faces t)
>
> The above does not work with GNU emacs which is what I use
> now and I have not been able to find an alternative way of doing it.
>
> Could someone post an example of adding to an existing menu
> or adding to the main menu bar. Failing that could someone
> point me at an appropriate package?
>
> Regards,
> Neil (J Mackie).
>
>
>