unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* When is setq-default a bad idea? (It seems to simplify things over plain old setq.)
@ 2004-01-12 19:27 Christian Seberino
  2004-01-12 19:34 ` Henrik Enberg
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Seberino @ 2004-01-12 19:27 UTC (permalink / raw)


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

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

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

Chris

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: When is setq-default a bad idea? (It seems to simplify things over plain old setq.)
  2004-01-12 19:27 When is setq-default a bad idea? (It seems to simplify things over plain old setq.) Christian Seberino
@ 2004-01-12 19:34 ` Henrik Enberg
  0 siblings, 0 replies; 2+ messages in thread
From: Henrik Enberg @ 2004-01-12 19:34 UTC (permalink / raw)


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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-01-12 19:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-12 19:27 When is setq-default a bad idea? (It seems to simplify things over plain old setq.) Christian Seberino
2004-01-12 19:34 ` Henrik Enberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).