From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: defcustom: changing from defvar - order of execution Date: Thu, 05 May 2005 23:20:00 -0400 Organization: Bell Sympatico Message-ID: <87sm11jb5h.fsf-monnier+gnu.emacs.help@gnu.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1115350843 12154 80.91.229.2 (6 May 2005 03:40:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 6 May 2005 03:40:43 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 06 05:40:41 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DTthg-0005TF-DE for geh-help-gnu-emacs@m.gmane.org; Fri, 06 May 2005 05:40:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DTtpJ-00065E-OJ for geh-help-gnu-emacs@m.gmane.org; Thu, 05 May 2005 23:48:33 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!snoopy.risq.qc.ca!News.Dal.Ca!ursa-nb00s0.nbnet.nb.ca!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:RPfxTekK5rOy4nzBzvepyvt+Kwg= Original-Lines: 20 Original-NNTP-Posting-Host: 65.92.243.232 Original-X-Complaints-To: abuse@sympatico.ca Original-X-Trace: news20.bellglobal.com 1115349600 65.92.243.232 (Thu, 05 May 2005 23:20:00 EDT) Original-NNTP-Posting-Date: Thu, 05 May 2005 23:20:00 EDT Original-Xref: shelby.stanford.edu gnu.emacs.help:130711 Original-To: help-gnu-emacs@gnu.org 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:26363 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:26363 > The user in setup #2 has never used the library, let's say (and so, does not > have the setq in .emacs). The user knows nothing about setq and Lisp; he > just copies the text "(load-library "foo")(foo-fn)", per the library > comments, to his .emacs. He fires up Emacs, and then uses Customize to set > and save foovar. This causes (custom-set-variables...) to be added to the > end of his .emacs - after the load-library and the call to foo-fn. > The user is then surprised to find that the customization had no effect: in > subsequent Emacs sessions, load-library does the defcustom, which sets > foovar to nil; and foo-fn then executes with foovar=nil, returning `t'. > What am I missing? That this situation you describe is just a bug in the elisp library. Most likely in the comment that suggests "(load-library "foo")(foo-fn)", but it's hard to say without more info. In any case the scenario you describe doesn't seem to be common. Stefan