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

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

Re: Eval elisp file automatically


From: Stefan Monnier
Subject: Re: Eval elisp file automatically
Date: Mon, 31 Jan 2011 11:20:31 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> I have some functions and variables which I only need in one particular
> directory.

We have .dir-locals.el for that.  Not sure if it'll be sufficient, since
you don't give much details.

> Another cool thing would be to reset to the defaut value the variables
> when I'm not, but it's not really necessary...

I have no idea what you mean by "when I'm not": Emacs has many buffers
(and windows) so you may have some buffers visiting files in that
directory and others visiting files in other directories.  In that case
would you want your functions to be loaded?

Also you talk about restting variables, which implies you're talking not
about new variables but about changing the value of existing variables,
in which case you probably don't ant to set them globally (which would
affect all buffers, including the ones that are visiting files in
other directories), but instead you want to set them buffer-locally,
i.e. have different values in the buffers that visit this directory than
in other buffers (which is what would happen with .dir-locals.el, for
example).


        Stefan


reply via email to

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