From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: adding perl-mode menu Date: Mon, 14 Feb 2005 08:59:18 -0500 Organization: Bell Sympatico Message-ID: <87r7jjz1ml.fsf-monnier+gnu.emacs.help@gnu.org> References: <1108328085.046420.311790@l41g2000cwc.googlegroups.com> <87vf8v29zp.fsf-monnier+gnu.emacs.help@gnu.org> <1108354394.112354.223690@c13g2000cwb.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1108390694 31385 80.91.229.2 (14 Feb 2005 14:18:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 14 Feb 2005 14:18:14 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 14 15:18:14 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D0h3A-0006PY-R5 for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Feb 2005 15:18:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D0hIi-0006Nu-Uz for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Feb 2005 09:34:12 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wns14feed!worldnet.att.net!207.35.177.252!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:0dCt2I+9yYwhoLnPQMpn9qXF9Bs= Original-Lines: 21 Original-NNTP-Posting-Host: 67.68.217.32 Original-X-Complaints-To: abuse@sympatico.ca Original-X-Trace: news20.bellglobal.com 1108389557 67.68.217.32 (Mon, 14 Feb 2005 08:59:17 EST) Original-NNTP-Posting-Date: Mon, 14 Feb 2005 08:59:17 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:128543 Original-To: help-gnu-emacs@gnu.org 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 X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: main.gmane.org gmane.emacs.help:24075 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24075 > i put this in my .emacs file and it complains... A good habit is to give too much info. Much better than too little. Basically, just assume we're 100% pure idiot. Just saying "complains" is not enough. > it only works when it is set to global-map. It doesnt seem to recognize > perl-mode-map.... That's because perl-mode-map is only created when perl-mode is loaded which only happens when you open a Perl file. You can do (defun my-perl-hook () (define-key perl-mode-map [menu-bar cust] (cons "Cust" (make-sparse-keymap "Cust")))) (add-hook 'perl-mode-hook 'my-perl-hook) -- Stefan