From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.devel Subject: Re: defvar vs setqif.. Date: Mon, 20 May 2002 22:05:19 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: References: <1021841986.24318.2803.camel@space-ghost> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1021926958 24850 127.0.0.1 (20 May 2002 20:35:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 20 May 2002 20:35:58 +0000 (UTC) Cc: Colin Walters , emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 179tss-0006Sh-00 for ; Mon, 20 May 2002 22:35:58 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 179u6y-0008Uh-00 for ; Mon, 20 May 2002 22:50:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 179tt7-0000yv-00; Mon, 20 May 2002 16:36:13 -0400 Original-Received: from waldorf.cs.uni-dortmund.de ([129.217.4.42]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 179tPM-0007i9-00 for ; Mon, 20 May 2002 16:05:28 -0400 Original-Received: from lothlorien.cs.uni-dortmund.de (lothlorien [129.217.19.67]) by waldorf.cs.uni-dortmund.de with ESMTP id g4KK5Pb09941; Mon, 20 May 2002 22:05:25 +0200 (MES) Original-Received: from lucy.cs.uni-dortmund.de (lucy [129.217.19.80]) by lothlorien.cs.uni-dortmund.de id WAA05600; Mon, 20 May 2002 22:05:19 +0200 (MET DST) Original-Received: by lucy.cs.uni-dortmund.de (Postfix, from userid 6104) id 683443B41D; Mon, 20 May 2002 22:05:19 +0200 (CEST) Original-To: "D. Goel" In-Reply-To: ("D. Goel"'s message of "20 May 2002 15:08:00 -0400") Original-Lines: 34 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2.50 (i686-pc-linux-gnu) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:4206 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4206 "D. Goel" writes: > say a user wants to frob a thousand variables in their .emacs or their > own private library... they don't want to (require) all the involved > libraries, thus slowing down the loading of emacs.. so the user simply > make sures the variables are defined via defvar, and then runs > (add-to-list) or whatever on these variables.. IMHO, this is a bad idea. The intention of add-to-list is to add something to whatever the value was before, right? And before the add-to-list, the most meaningful value would be the default value (instead of nil). Now, if a variable has a non-nil default value, then your suggestion means it will have a very short value: just the single item you put in it. So (defvar foo) (add-to-list 'foo 'item) could as well have been written (setq foo '(item)) Now, most lists should have nil default values, to facilitate Customize. But your argument strikes me as a bad argument: to add something to the default value, users will have to require the corresponding *.el file anyway. Or am I misunderstanding something here and way too tired? kai -- Silence is foo!