From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel Subject: Re: defvar vs setqif.. Date: 20 May 2002 15:41:16 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: References: <1021841986.24318.2803.camel@space-ghost> NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1021923745 18988 127.0.0.1 (20 May 2002 19:42:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 20 May 2002 19:42:25 +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 179t33-0004w9-00 for ; Mon, 20 May 2002 21:42:25 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 179tH8-0007Jx-00 for ; Mon, 20 May 2002 21:56:59 +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 179t3K-0004fp-00; Mon, 20 May 2002 15:42:42 -0400 Original-Received: from colo.agora-net.com ([207.245.85.68]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 179t26-0004VR-00 for ; Mon, 20 May 2002 15:41:26 -0400 Original-Received: from ttn by colo.agora-net.com with local (Exim 3.34 #1) id 179t1w-0008Fu-00; Mon, 20 May 2002 15:41:16 -0400 Original-To: "D. Goel" In-Reply-To: "D. Goel"'s message of "20 May 2002 15:08:00 -0400" Original-Lines: 22 X-Mailer: Gnus v5.7/Emacs 20.7 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:4202 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4202 "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.. there's a better way to do this: use `eval-after-load'. for example: ;; not recommended: using "forward declarations" (defvar foo) ; from foo-package (munge foo) ;; recommended: delaying evaluation until after some package is loaded (eval-after-load "foo-package" '(munge foo)) note that the form needs to be quoted unless its evaluation is to return the actual form to be evaluated (after/when foo-package is loaded). thi