From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: PJ Weisberg Newsgroups: gmane.emacs.help Subject: Re: Modifying many function calls Date: Thu, 28 Oct 2010 02:56:35 +0000 Message-ID: References: <4CC7DEB0.8040401@easy-emacs.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1288234628 5924 80.91.229.12 (28 Oct 2010 02:57:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 28 Oct 2010 02:57:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 28 04:57:06 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 1PBIfp-00089g-NA for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Oct 2010 04:57:06 +0200 Original-Received: from localhost ([127.0.0.1]:59591 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PBIfo-0004Dc-W5 for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Oct 2010 22:57:05 -0400 Original-Received: from [140.186.70.92] (port=44089 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PBIfR-0004D9-CJ for help-gnu-emacs@gnu.org; Wed, 27 Oct 2010 22:56:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PBIfQ-000315-BM for help-gnu-emacs@gnu.org; Wed, 27 Oct 2010 22:56:41 -0400 Original-Received: from p3plsmtpa01-06.prod.phx3.secureserver.net ([72.167.82.86]:33250) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PBIfQ-000311-0V for help-gnu-emacs@gnu.org; Wed, 27 Oct 2010 22:56:40 -0400 Original-Received: (qmail 11169 invoked from network); 28 Oct 2010 02:56:38 -0000 Original-Received: from unknown (74.125.82.41) by p3plsmtpa01-06.prod.phx3.secureserver.net (72.167.82.86) with ESMTP; 28 Oct 2010 02:56:37 -0000 Original-Received: by wwe15 with SMTP id 15so674855wwe.0 for ; Wed, 27 Oct 2010 19:56:35 -0700 (PDT) Original-Received: by 10.216.25.9 with SMTP id y9mr1686346wey.83.1288234595536; Wed, 27 Oct 2010 19:56:35 -0700 (PDT) Original-Received: by 10.216.233.163 with HTTP; Wed, 27 Oct 2010 19:56:35 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:75260 Archived-At: On Wed, Oct 27, 2010 at 10:16 AM, Andrea Crotti wrote: > And since I'm here, why I can't redefine a variable with defcustom? > I mean if I do > > (defcustom x 1) > then I want to change it > and I write and evaluate > (defcustom x 2) > > then even if I set it to nil and the reevaluate again still it doesn't > care. > Is that normal? If the user has already customized x to some value (nil or anything else), then you don't want the default value to overwrite it. So defcustom avoids setting the value if it's already been set. (Note that if x is a buffer-local variable with no global value, defcustom will set the global default value without changing the local value.)