[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Derived Mode 102 Keybindings and Menu
From: |
Tim Johnson |
Subject: |
Re: Derived Mode 102 Keybindings and Menu |
Date: |
Tue, 21 Mar 2006 20:55:41 -0000 |
User-agent: |
slrn/0.9.8.0 (Linux) |
On 2006-03-21, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> This is the continuation of the Derived Mode 101 HOWTO thread.
>> Johan and Stefan were able to help me to set up syntax highlighting.
>> The following file extends the derived mode by adding keymaps, bindings
>> and a menu.
>
> Google around and see how other packages use the easymenu package.
> The typical way to use it is to have somewhere at the toplevel:
:-) Just realized that the code I included *did not* include a menu.
> (easy-menu-define foo-menu foo-mode-map "Foo mode menu."
> '("Foo"
> [...]
> [...]
> ...))
>
> and then in foo-mode you do
and I have menu working for both forks. For cross-compatibility XEmacs
needs a more verbose approach, including passing the keymap as an
argument. I will post the template later, when I've got time to
annotate with some documentation.
Thanks
tim
> (easy-menu-add foo-menu)
>
> and that's all there is to it and it should work on both Emacs and XEmacs
> (cross-compatibility is the raison d'ĂȘtre of easymenu.el).
>
>
> Stefan
--
Tim Johnson <tim@johnsons-web.com>
http://www.alaska-internet-solutions.com