* reloading mode
@ 2004-11-23 9:58 Alex Polite
2004-11-23 11:45 ` Daniel Pittman
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Alex Polite @ 2004-11-23 9:58 UTC (permalink / raw)
I'm altering a mode (transcript.el). Restarting emacs after every edit
to the mode file is very tedious. What's the right way of doing it?
alex
--
Alex Polite
http://polite.se
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: reloading mode
2004-11-23 9:58 reloading mode Alex Polite
@ 2004-11-23 11:45 ` Daniel Pittman
2004-11-27 20:14 ` Kai Grossjohann
2004-11-23 11:55 ` David Raleigh Arnold
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Daniel Pittman @ 2004-11-23 11:45 UTC (permalink / raw)
On 23 Nov 2004, Alex Polite wrote:
> I'm altering a mode (transcript.el). Restarting emacs after every edit
> to the mode file is very tedious. What's the right way of doing it?
You can put your cursor at or after the closing bracket in the
expression and hit 'C-M-x' to run `eval-defun' and, as such, execute the
changed code.
Alternately, `M-x eval-buffer' in the mode buffer will run all the code
there, changing the definitions at runtime.
Finally, you can `M-x load-file', then specify which Lisp file to load,
or even `M-x byte-compile-file' to byte-compile it before you load it.
Anyway, if you change a function, or whatever, you can simply execute
that Lisp code at runtime and the change takes immediate effect within
Emacs.
Regards,
Daniel
--
Advertising is a valuable economic factor because it is the cheapest way of
selling goods, especially if the goods are worthless.
-- Sinclair Lewis
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: reloading mode
2004-11-23 11:45 ` Daniel Pittman
@ 2004-11-27 20:14 ` Kai Grossjohann
0 siblings, 0 replies; 8+ messages in thread
From: Kai Grossjohann @ 2004-11-27 20:14 UTC (permalink / raw)
Daniel Pittman <daniel@rimspace.net> writes:
> On 23 Nov 2004, Alex Polite wrote:
>> I'm altering a mode (transcript.el). Restarting emacs after every edit
>> to the mode file is very tedious. What's the right way of doing it?
>
> You can put your cursor at or after the closing bracket in the
> expression and hit 'C-M-x' to run `eval-defun' and, as such, execute the
> changed code.
C-M-x is used *inside* the expression to evaluate. C-x C-e is used
after the closing parenthesis.
One other difference is that C-M-x only evaluates top-level
expressions, but C-x C-e can be used inside expressions, too.
C-M-x handles defvar specially, I think that C-x C-e does not.
(The special handling means that changing the value in a defvar and
then doing C-M-x in it changes the value of the variable in Emacs,
although the standard definition of defvar does not change the
variable's value, if it already has one.)
Kai
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: reloading mode
2004-11-23 9:58 reloading mode Alex Polite
2004-11-23 11:45 ` Daniel Pittman
@ 2004-11-23 11:55 ` David Raleigh Arnold
[not found] ` <mailman.919.1101211520.27204.help-gnu-emacs@gnu.org>
2004-11-23 12:09 ` Albert Reiner
3 siblings, 0 replies; 8+ messages in thread
From: David Raleigh Arnold @ 2004-11-23 11:55 UTC (permalink / raw)
On Tuesday 23 November 2004 04:58 am, Alex Polite wrote:
> I'm altering a mode (transcript.el). Restarting emacs after every edit
> to the mode file is very tedious. What's the right way of doing it?
I'm way over my head here, but is there anything useful from
C-h a
load
? I don't know what I'm looking at myself. daveA
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <mailman.919.1101211520.27204.help-gnu-emacs@gnu.org>]
* Re: reloading mode
[not found] ` <mailman.919.1101211520.27204.help-gnu-emacs@gnu.org>
@ 2004-11-23 12:09 ` Alex Polite
2004-11-23 19:56 ` Joe Corneli
2004-11-23 20:55 ` Stefan Monnier
0 siblings, 2 replies; 8+ messages in thread
From: Alex Polite @ 2004-11-23 12:09 UTC (permalink / raw)
On tis, nov 23, 2004 at 06:55:49 -0500, David Raleigh Arnold wrote:
> On Tuesday 23 November 2004 04:58 am, Alex Polite wrote:
> > I'm altering a mode (transcript.el). Restarting emacs after every edit
> > to the mode file is very tedious. What's the right way of doing it?
>
> I'm way over my head here, but is there anything useful from
>
> C-h a
> load
>
> ? I don't know what I'm looking at myself. daveA
I found load-file but that doesn't do the trick.
--
Alex Polite
http://polite.se
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: reloading mode
2004-11-23 12:09 ` Alex Polite
@ 2004-11-23 19:56 ` Joe Corneli
2004-11-23 20:55 ` Stefan Monnier
1 sibling, 0 replies; 8+ messages in thread
From: Joe Corneli @ 2004-11-23 19:56 UTC (permalink / raw)
On tis, nov 23, 2004 at 06:55:49 -0500, David Raleigh Arnold wrote:
> On Tuesday 23 November 2004 04:58 am, Alex Polite wrote:
> > I'm altering a mode (transcript.el). Restarting emacs after every edit
> > to the mode file is very tedious. What's the right way of doing it?
>
> I'm way over my head here, but is there anything useful from
>
> C-h a
> load
>
> ? I don't know what I'm looking at myself. daveA
I found load-file but that doesn't do the trick.
I concur, and I haven't found anything better than restarting emacs.
To save time, I sometimes edit in one emacs and then do my testing in
another emacs that just loads the code defining the new mode.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: reloading mode
2004-11-23 12:09 ` Alex Polite
2004-11-23 19:56 ` Joe Corneli
@ 2004-11-23 20:55 ` Stefan Monnier
1 sibling, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2004-11-23 20:55 UTC (permalink / raw)
>>>>> "Alex" == Alex Polite <m4@polite.se> writes:
> I found load-file but that doesn't do the trick.
Is "doesn't do the trick" the best description you can come up with?
I must say, I feel like ti doesn't give me nearly enough clues to start
helping you solve your problem.
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: reloading mode
2004-11-23 9:58 reloading mode Alex Polite
` (2 preceding siblings ...)
[not found] ` <mailman.919.1101211520.27204.help-gnu-emacs@gnu.org>
@ 2004-11-23 12:09 ` Albert Reiner
3 siblings, 0 replies; 8+ messages in thread
From: Albert Reiner @ 2004-11-23 12:09 UTC (permalink / raw)
[Alex Polite <m4@polite.se>, 23 Nov 2004 09:58:47 GMT]:
> I'm altering a mode (transcript.el). Restarting emacs after every edit
> to the mode file is very tedious. What's the right way of doing it?
I don't know much about these things, but can't you just M-x load-file
filename RET?
Or you can evaluate all definitions as you change them with C-M-x (or
C-x C-e should that buffer be in a non-Lispy mode).
Albert.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-11-27 20:14 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-23 9:58 reloading mode Alex Polite
2004-11-23 11:45 ` Daniel Pittman
2004-11-27 20:14 ` Kai Grossjohann
2004-11-23 11:55 ` David Raleigh Arnold
[not found] ` <mailman.919.1101211520.27204.help-gnu-emacs@gnu.org>
2004-11-23 12:09 ` Alex Polite
2004-11-23 19:56 ` Joe Corneli
2004-11-23 20:55 ` Stefan Monnier
2004-11-23 12:09 ` Albert Reiner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).