From: Tassilo Horn <tassilo@member.fsf.org>
To: help-gnu-emacs@gnu.org
Subject: Re: New menu creation
Date: Thu, 27 May 2010 16:47:18 +0200 [thread overview]
Message-ID: <87hblt766h.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: 28685978.post@talk.nabble.com
supreet <supreet.prasad@gmail.com> writes:
Hi!
> I am very new to Emacs. I am trying to create a new menu in the menu bar.
> How do I proceed?
> I downloaded the source and I see a lot of .el files under the lisp
> directory. Do I create a new file there?
No, you can do that by placing some code into your ~/.emacs file. No
need to modify the emacs source code.
> Please let me know if there are any links or info that I can follow.
Have a look at the documentation:
,----[ (info "(elisp)Menu Bar") ]
| ;; Make a menu keymap (with a prompt string)
| ;; and make it the menu bar item's definition.
| (define-key global-map [menu-bar words]
| (cons "Words" (make-sparse-keymap "Words")))
|
| ;; Define specific subcommands in this menu.
| (define-key global-map
| [menu-bar words forward]
| '("Forward word" . forward-word))
| (define-key global-map
| [menu-bar words backward]
| '("Backward word" . backward-word))
`----
To jump to this documentation page inside emacs, put the boxquote
heading
(info "(elisp)Menu Bar")
into emacs' *scratch* buffer and hit `C-x C-e' after the last closing
paren.
Bye,
Tassilo
next prev parent reply other threads:[~2010-05-27 14:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-26 20:32 New menu creation supreet
2010-05-27 14:21 ` Drew Adams
2010-06-01 20:09 ` supreet
2010-05-27 14:47 ` Tassilo Horn [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-05-26 18:39 supreet prasad
2010-05-27 1:24 ` David Lee
[not found] ` <AANLkTikfS8Fk-Fj5eZu-4-OJVbkyJrS0jORSjVg_oTqi@mail.gmail.com>
2010-05-27 18:01 ` supreet prasad
2010-05-27 18:35 ` New " Jan Djärv
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=87hblt766h.fsf@thinkpad.tsdh.de \
--to=tassilo@member.fsf.org \
--cc=help-gnu-emacs@gnu.org \
/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.