From: lee <lee@yun.yagibdah.de>
To: help-gnu-emacs@gnu.org
Subject: Re: setting the mode of a buffer
Date: Sat, 15 Mar 2014 22:09:22 +0100 [thread overview]
Message-ID: <87a9cruq2l.fsf@yun.yagibdah.de> (raw)
In-Reply-To: <slrnli1nb5.37u.joost.m.kremers@j.kremers4.news.arnhem.chello.nl> (Joost Kremers's message of "12 Mar 2014 22:19:17 GMT")
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.
next prev parent reply other threads:[~2014-03-15 21:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.16657.1394156425.10748.help-gnu-emacs@gnu.org>
2014-03-07 8:47 ` setting the mode of a buffer Joost Kremers
2014-03-07 11:28 ` lee
[not found] ` <mailman.16664.1394193871.10748.help-gnu-emacs@gnu.org>
2014-03-12 22:19 ` Joost Kremers
2014-03-13 12:26 ` Stefan Monnier
2014-03-15 21:12 ` lee
2014-03-15 21:09 ` lee [this message]
[not found] ` <mailman.17152.1394713615.10748.help-gnu-emacs@gnu.org>
2014-03-17 11:17 ` Joost Kremers
2014-03-07 0:10 lee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a9cruq2l.fsf@yun.yagibdah.de \
--to=lee@yun.yagibdah.de \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.