From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikolaj Schumacher Newsgroups: gmane.emacs.help Subject: Re: Replacing custom-set-variables Date: Sun, 14 Sep 2008 23:30:27 +0200 Message-ID: References: <87myibregu.fsf@kobe.laptop> <87r67ncpoc.fsf@lion.rapttech.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1221427864 19196 80.91.229.12 (14 Sep 2008 21:31:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Sep 2008 21:31:04 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Tim X Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 14 23:32:00 2008 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.50) id 1KezCD-00016X-55 for geh-help-gnu-emacs@m.gmane.org; Sun, 14 Sep 2008 23:31:53 +0200 Original-Received: from localhost ([127.0.0.1]:46543 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KezBC-0007T7-Dr for geh-help-gnu-emacs@m.gmane.org; Sun, 14 Sep 2008 17:30:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KezAs-0007Om-SP for help-gnu-emacs@gnu.org; Sun, 14 Sep 2008 17:30:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KezAs-0007OL-Eo for help-gnu-emacs@gnu.org; Sun, 14 Sep 2008 17:30:30 -0400 Original-Received: from [199.232.76.173] (port=34350 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KezAs-0007OC-C7 for help-gnu-emacs@gnu.org; Sun, 14 Sep 2008 17:30:30 -0400 Original-Received: from dd18200.kasserver.com ([85.13.138.168]:38859) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KezAs-0000TN-33 for help-gnu-emacs@gnu.org; Sun, 14 Sep 2008 17:30:30 -0400 Original-Received: from thursday (BAH549e.bah.pppool.de [77.135.84.158]) by dd18200.kasserver.com (Postfix) with ESMTP id 1DE4E180AF319; Sun, 14 Sep 2008 23:30:33 +0200 (CEST) In-Reply-To: <87r67ncpoc.fsf@lion.rapttech.com.au> (Tim X.'s message of "Sun\, 14 Sep 2008 14\:33\:07 +1000") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2.50 (darwin) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:57587 Archived-At: Tim X wrote: > Giorgos Keramidas 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