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

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

Re: Derived Mode 102 Keybindings and Menu


From: Stefan Monnier
Subject: Re: Derived Mode 102 Keybindings and Menu
Date: Tue, 21 Mar 2006 12:01:57 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> 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:

(easy-menu-define foo-menu foo-mode-map "Foo mode menu."
  '("Foo"
    [...]
    [...]
    ...))

and then in foo-mode you do

  (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


reply via email to

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