* changes made to lisp-mode.el no effect
@ 2009-01-08 0:22 Kada Situ
2009-01-08 1:19 ` Kevin Rodgers
[not found] ` <mailman.4302.1231377574.26697.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 3+ messages in thread
From: Kada Situ @ 2009-01-08 0:22 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1251 bytes --]
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?
Any help would be appreciated.
[-- Attachment #2: Type: text/html, Size: 1734 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: changes made to lisp-mode.el no effect
2009-01-08 0:22 changes made to lisp-mode.el no effect Kada Situ
@ 2009-01-08 1:19 ` Kevin Rodgers
[not found] ` <mailman.4302.1231377574.26697.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2009-01-08 1:19 UTC (permalink / raw)
To: help-gnu-emacs
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.
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: changes made to lisp-mode.el no effect
[not found] ` <mailman.4302.1231377574.26697.help-gnu-emacs@gnu.org>
@ 2009-01-08 4:15 ` Chetan
0 siblings, 0 replies; 3+ messages in thread
From: Chetan @ 2009-01-08 4:15 UTC (permalink / raw)
To: help-gnu-emacs
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-08 4:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-08 0:22 changes made to lisp-mode.el no effect Kada Situ
2009-01-08 1:19 ` Kevin Rodgers
[not found] ` <mailman.4302.1231377574.26697.help-gnu-emacs@gnu.org>
2009-01-08 4:15 ` Chetan
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.