all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tim Johnson <tim@johnsons-web.com>
Subject: Re: Derived Mode 102 Keybindings and Menu
Date: Tue, 21 Mar 2006 20:55:41 -0000	[thread overview]
Message-ID: <slrne20num.im2.tim@linus.johnson.com> (raw)
In-Reply-To: 871wwvg2i0.fsf-monnier+gnu.emacs.help@gnu.org

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

  reply	other threads:[~2006-03-21 20:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-17 22:56 Derived Mode 102 Keybindings and Menu Tim Johnson
2006-03-21 17:01 ` Stefan Monnier
2006-03-21 20:55   ` Tim Johnson [this message]
2006-03-21 22:13     ` Stefan Monnier
2006-03-22  1:55       ` Tim Johnson
2006-03-22  3:55         ` Tim Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=slrne20num.im2.tim@linus.johnson.com \
    --to=tim@johnsons-web.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.