all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.