Eli Zaretskii wrote:
>>From: don provan <[EMAIL PROTECTED]>
>>Date: Mon, 29 Aug 2005 00:35:25 -0700
>>
>>Wow. I would have said .emacs code is broken if it cannot be
>>re-evaluated without causing bad side effects, so I must be missing
>>something.
>
> You are not missing anything, I think.  Simply put, typical .emacs
> code is written assuming that it is evaluated only once, when Emacs
> starts.  While that might be a bad assumption for general-purpose Lisp
> code, what one puts in .emacs is not general-purpose code, and in any
> case, that's how people tend to do it.
>
>
>>Can you give some examples and explain why they can't be avoided?
>>About the only thing I'm aware of doing is adding duplicate entries
>>to some lists, and even that I could avoid if I thought the effect
>>would amount to something bad.
>
>
> Adding things to a list is one typical example (adding a hook function
> is a frequently seen variant of this).  Doing something if some symbol
> is not bound or if some feature is not available (meaning a package is
> not loaded) is another.  There's more.

For example, if you want to double the default value of some variable:

(setq max-lisp-eval-depth (* 2 max-lisp-eval-depth))

--
Kevin Rodgers



_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to