From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Cecil Westerhof Newsgroups: gmane.emacs.help Subject: Re: 'initial-major-mode interaction with 'major-mode Date: Thu, 20 May 2010 13:52:28 +0200 Organization: Decebal Computing Message-ID: <8739xmhjsz.fsf@linux-lqcw.site> References: <5602dc29-464a-4ecd-8d5a-364283d479e7@o1g2000vbe.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1291833088 18121 80.91.229.12 (8 Dec 2010 18:31:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Dec 2010 18:31:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 08 19:31:24 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQOnS-0004hZ-Qh for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 19:31:23 +0100 Original-Received: from localhost ([127.0.0.1]:52714 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQOnS-0003BV-5J for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 13:31:22 -0500 Original-Path: usenet.stanford.edu!syros.belnet.be!news.belnet.be!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Original-Newsgroups: gnu.emacs.help X-Homepage: http://www.decebal.nl/ User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:p0+euihRByHMfVRQGdhOFYZG6gQ= Original-Lines: 23 Original-NNTP-Posting-Host: 84.53.123.169 Original-X-Trace: 1274356318 news.xs4all.nl 22918 decebal/[::ffff:84.53.123.169]:12977 Original-X-Complaints-To: abuse@xs4all.nl Original-Xref: usenet.stanford.edu gnu.emacs.help:178295 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:75795 Archived-At: 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