help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changes made to lisp-mode.el no effect


From: Chetan
Subject: Re: changes made to lisp-mode.el no effect
Date: Wed, 07 Jan 2009 20:15:45 -0800
User-agent: Emacs Gnus

Kevin Rodgers <kevin.d.rodgers@gmail.com> writes:

> Kada Situ wrote:
>> Hi,
>>
>> I wanted to add an menu item for uncommentting out region under Emacs-Lisp in
>> lisp mode. So I added the following code in lisp-mode.el under my emacs
>> installation directory (in C:\emacs\lisp\emacs-lisp to be exact).
>>
>> ...
>>     (define-key map [separator-eval] '("--"))
>>     (define-key map [eval-buffer] '("Evaluate Buffer" . eval-buffer))
>>     (define-key map [eval-region] '("Evaluate Region" . eval-region))
>>     (define-key map [eval-sexp] '("Evaluate Last S-expression"
>> . eval-last-sexp))
>>     (define-key map [separator-format] '("--"))
>>         (define-key map [uncomment-region] '("Uncomment Out Region"
>> . uncomment-region));; added
>>     (define-key map [comment-region] '("Comment Out Region"
>> . comment-region))
>>     (define-key map [indent-region] '("Indent Region" . indent-region))
>>     (define-key map [indent-line] '("Indent Line" . lisp-indent-line))
>>     (put 'eval-region 'menu-enable 'mark-active)
>>     (put 'comment-region 'menu-enable 'mark-active)
>>     (put 'uncomment-region 'menu-enable 'mark-active) ;;added
>>     (put 'indent-region 'menu-enable 'mark-active)...
>>
>>
>> of course, I didn't forget to byte-compile the file. But the menu items don't
>> seem to be taking effect after this. Am I missing something?
>
> In emacs -Q (featurep 'lisp-mode) returns t, meaning that lisp-mode.elc
> has already been loaded (dumped in the executable, actually).
>
> You could explicitly (re)load it in site-start.el or default.el.

You could also do it from your .emacs and directly modify
emacs-lisp-mode-map and the menu item available from that map.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]