all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Cecil Westerhof <Cecil@decebal.nl>
To: help-gnu-emacs@gnu.org
Subject: Re: 'initial-major-mode interaction with 'major-mode
Date: Thu, 20 May 2010 13:52:28 +0200	[thread overview]
Message-ID: <8739xmhjsz.fsf@linux-lqcw.site> (raw)
In-Reply-To: e653000c-5c1e-46f5-8dba-17c09b07c1c6@j27g2000vbp.googlegroups.com

Op donderdag 20 mei 2010 11:44 CEST schreef Lars Wessman:

> Just for curiosity's sake, why was the decision made to create a
> separate function for defining defaults (assuming that is what setq-
> default does without having checked the code)? What is gained by
> departing from the simplicity of just using setq? Again, I'm not
> challenging the change, just interested in the reasoning behind it
> because I like to know how architectural decisions are justified in
> general.

With setq you set the value in the current buffer (if it is not a global
value). With setq-default  you make the value you set  the value for all
the buffers you do not explicitly set it. So that could change the value
in for example ten buffers instead of only the current one.

There is  a little caveat. If you  already set the value  in the current
buffer and then use setq-default  the value changes in the buffers where
it was not set, but not in the current buffer.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof


  reply	other threads:[~2010-05-20 11:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5602dc29-464a-4ecd-8d5a-364283d479e7@o1g2000vbe.googlegroups.com>
2010-05-18 16:06 ` 'initial-major-mode interaction with 'major-mode Lars Wessman
2010-05-18 16:51 ` Stefan Monnier
2010-05-19 19:11   ` Lars Wessman
2010-05-20  3:53     ` Stefan Monnier
2010-05-20  9:44       ` Lars Wessman
2010-05-20 11:52         ` Cecil Westerhof [this message]
2010-05-20  9:46       ` Lars Wessman
2010-05-20 10:33       ` Lars Wessman

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=8739xmhjsz.fsf@linux-lqcw.site \
    --to=cecil@decebal.nl \
    --cc=help-gnu-emacs@gnu.org \
    /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.