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

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

Re: setting the mode of a buffer


From: lee
Subject: Re: setting the mode of a buffer
Date: Sat, 15 Mar 2014 22:09:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Joost Kremers <joost.m.kremers@gmail.com> writes:

> lee wrote:

> [...]
>> When I make a change, I byte-compile again.  From there on, I need some
>> way to apply the changes.  So far, I´ve been reloading the mode to
>> achieve this.
>
> Yes, but you do not need to unload it first. If you reload the file, the
> new definitions will replace the old ones.

>> Are you saying that changes are magically applied by recompiling?  Or
>> should I use 'M-x eval-defun my-mode' to apply them after recompiling?
>> And when I do so, wouldn´t emacs figure that it already knows the mode
>> because it´s already loaded and continue to use the previous version?
>
> You do need to reload it, compiling alone is not enough.

Hm, yes, I have made another mode yesterday, and re-compiling and
reloading it and C-x C-e to redefine functions worked fine.

> IME defvar definitions aren't always updated when you reload a file, but
> that's easily remedied with a setq in an *ielm* buffer. (Do `M-x ielm'
> if you don't know about ielm. It's a god send.)

Wow, ielm is really good to know, thanks!


-- 
Knowledge is volatile and fluid.  Software is power.



reply via email to

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