[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: adding perl-mode menu
From: |
Stefan Monnier |
Subject: |
Re: adding perl-mode menu |
Date: |
Mon, 14 Feb 2005 08:59:18 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) |
> 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