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

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

Re: When is setq-default a bad idea? (It seems to simplify things over p


From: Henrik Enberg
Subject: Re: When is setq-default a bad idea? (It seems to simplify things over plain old setq.)
Date: Mon, 12 Jan 2004 20:34:40 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux)

seberino@spawar.navy.mil (Christian Seberino) writes:

> If I use setq then I have to worry about minor modes and major modes
> overwriting my settings.

Only local variables are possibly overridden by modes.  See the node
"Locals" in the Emacs manual for a comprehensive explanation of local
variables.

> It seems like setq-default is more comprehensive and overrides any
> attempted changes to variables elsewhere.

Not really.  setq-default simply sets a default value of a variable, it
doesn't prevent changing that value later.

> When is it a problem if I use setq-default exclusively?

It's rather pointless with non-local variables, and uses more memory.


reply via email to

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