[Top][All Lists]

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

Re: re-loading an elisp file

From: ken
Subject: Re: re-loading an elisp file
Date: Sat, 05 Mar 2011 12:13:52 -0500
User-agent: Thunderbird (X11/20101213)

On 03/05/2011 10:54 AM Drew Adams wrote:
>> Is there a way, when reloading an elisp file, to have it examine (and
>> reload new) values of variables?  It's weird that this isn't done with
>> "eval-current-buffer" or "load ..." and others.
> Sounds like you are discovering that `defvar' does not assign a variable a 
> value
> if it already has one.  

Actually, I thought my computer had some corrupt memory... but then I
googled and after a time read about it on a forum on the web.

> This is a feature.

Hmm.  I've heard that said before.

> `setq' and `setq-default' do, however.
> But in general an Elisp library should not act this way, by design.  A 
> personal
> init file is another story - there you might want to use `setq' and
> `setq-default' in some cases.

The forum said that the simplest way to re-initialize a variable in
elisp was to reboot emacs.  I thought, "that's knuckle-headed... can't
be true."  But I guess it is.  Your work-around though-- changing all
the defvar's to setq's-- is preferable.


reply via email to

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