From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chris Withers Newsgroups: gmane.emacs.help Subject: Customising the menu for python-mode Date: Sat, 16 May 2009 17:55:17 +0100 Message-ID: <4A0EEFF5.2050903@simplistix.co.uk> References: <4A02D601.2000107@simplistix.co.uk> <4A09408A.2010108@simplistix.co.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1242492947 7351 80.91.229.12 (16 May 2009 16:55:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 May 2009 16:55:47 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Nikolaj Schumacher Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 16 18:55:40 2009 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.50) id 1M5NAh-0000ik-E1 for geh-help-gnu-emacs@m.gmane.org; Sat, 16 May 2009 18:55:39 +0200 Original-Received: from localhost ([127.0.0.1]:52752 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M5NAg-0007Uh-VP for geh-help-gnu-emacs@m.gmane.org; Sat, 16 May 2009 12:55:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M5NAN-0007Uc-4U for help-gnu-emacs@gnu.org; Sat, 16 May 2009 12:55:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M5NAL-0007UQ-Gv for help-gnu-emacs@gnu.org; Sat, 16 May 2009 12:55:17 -0400 Original-Received: from [199.232.76.173] (port=48867 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M5NAL-0007UN-B1 for help-gnu-emacs@gnu.org; Sat, 16 May 2009 12:55:17 -0400 Original-Received: from server1.simplistix.co.uk ([89.151.125.140]:59855) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M5NAK-00071p-TR for help-gnu-emacs@gnu.org; Sat, 16 May 2009 12:55:17 -0400 Original-Received: from [192.168.1.15] (cust162-dsl93-89-128.idnet.net [93.89.128.162]) by server1.simplistix.co.uk (Postfix) with ESMTPSA id 224094F8079; Sat, 16 May 2009 17:55:16 +0100 (BST) User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:64494 Archived-At: Nikolaj Schumacher wrote: > Chris Withers wrote: > >> Nikolaj Schumacher wrote: >>> Chris Withers wrote: >>> >>>> - the comment/uncomment menu items on the python menu have vanished. How do I >>>> get these back? >>> You can be defining your own menu, but maybe you just want to start >>> using the universal comment commands, e.g. comment-or-uncomment-region. >> I should have known this was possible really ;-) >> >> Where can I find out how to do this? > > I don't use the menus, only keys, so I can't do it for you. > > Check out the Emacs manual > - 22.17.1.2 Extended Menu Items Fat lot of good that did me ;-) I tried monkey-see-monkey-do-ing from python.el and so far have this in my .emacs file: ;; menu items (defvar chris-mode-map (let ((map (make-sparse-keymap))) (easy-menu-define python-menu map "Python Mode menu" `("Python" :help "Python-specific Features" "-" ["Comment" python-shift-left :active mark-active :help "Comment"] ["Uncomment" python-shift-right :active mark-active :help "Uncomment"])) map)) Which, while it doesn't error, also does nothing. What am I doing wrong? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk