all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nikolaj Schumacher <me@nschum.de>
To: Tim X <timx@nospam.dev.null>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Replacing custom-set-variables
Date: Sun, 14 Sep 2008 23:30:27 +0200	[thread overview]
Message-ID: <m2zlmafma4.fsf@nschum.de> (raw)
In-Reply-To: <87r67ncpoc.fsf@lion.rapttech.com.au> (Tim X.'s message of "Sun\, 14 Sep 2008 14\:33\:07 +1000")

Tim X <timx@nospam.dev.null> wrote:

> Giorgos Keramidas <keramida@ceid.upatras.gr> writes:
>
> Be careful using setq-default in .emacs. The difference between setq and
> setq-default is that if the variable is already bound to a value,
> setq-default does nothing.

I think that is not quite correct.  `setq-default' never does
"nothing".  It only leaves values untouched for buffers that have a
local value for the variable.

> This is not to say that setq-default should not be used. To a large
> extent its a matter of taste/style. I just wanted to emphasise the
> differences between the two.

The difference is important mostly for variables that become
buffer-local automatically, like `tab-width'.  There's only two ways to
set them in your .emacs:  Either with hooks or with `setq-default'.

For all other variables, `setq' and `setq-default' are identical.


regards,
Nikolaj Schumacher




  parent reply	other threads:[~2008-09-14 21:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.19185.1221326409.18990.help-gnu-emacs@gnu.org>
2008-09-13 18:08 ` Replacing custom-set-variables Joost Diepenmaat
2008-09-13 19:05 ` Andy Stewart
2008-09-13 20:13 ` Giorgos Keramidas
2008-09-14  4:33   ` Tim X
2008-09-14  8:39     ` rustom
2008-09-14 21:30     ` Nikolaj Schumacher [this message]
2008-09-14  4:25 ` Tim X
2008-09-15 14:06   ` Mauricio
2008-09-13 17:19 Mauricio
2008-09-13 22:20 ` Drew Adams
2008-09-14  0:17   ` Lennart Borgman (gmail)
2008-09-14  0:53     ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2zlmafma4.fsf@nschum.de \
    --to=me@nschum.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=timx@nospam.dev.null \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.