From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: New menu creation Date: Thu, 27 May 2010 16:47:18 +0200 Message-ID: <87hblt766h.fsf@thinkpad.tsdh.de> References: <28685978.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1274971832 16475 80.91.229.12 (27 May 2010 14:50:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 27 May 2010 14:50:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 27 16:50:31 2010 connect(): No such file or directory Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OHePk-0005q6-PV for geh-help-gnu-emacs@m.gmane.org; Thu, 27 May 2010 16:50:29 +0200 Original-Received: from localhost ([127.0.0.1]:43481 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHePk-0002CL-2F for geh-help-gnu-emacs@m.gmane.org; Thu, 27 May 2010 10:50:28 -0400 Original-Received: from [140.186.70.92] (port=37116 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHeMt-0007yX-VR for help-gnu-emacs@gnu.org; Thu, 27 May 2010 10:47:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHeMs-0004Kz-L1 for help-gnu-emacs@gnu.org; Thu, 27 May 2010 10:47:31 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:50951) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHeMs-0004Kd-Fb for help-gnu-emacs@gnu.org; Thu, 27 May 2010 10:47:30 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OHeMp-000469-Du for help-gnu-emacs@gnu.org; Thu, 27 May 2010 16:47:27 +0200 Original-Received: from tsdh.uni-koblenz.de ([141.26.67.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 May 2010 16:47:27 +0200 Original-Received: from tassilo by tsdh.uni-koblenz.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 May 2010 16:47:27 +0200 X-Injected-Via-Gmane: http://gmane.org/ connect(): No such file or directory Original-Lines: 41 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: tsdh.uni-koblenz.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:es5xyCEGkqRQHPW+UB9ushp9oPg= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:73776 Archived-At: supreet 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