From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: defvar vs setqif.. Date: 20 May 2002 09:05:10 +0900 Sender: emacs-devel-admin@gnu.org Message-ID: <87d6vrsmyx.fsf@tc-1-100.kawasaki.gol.ne.jp> References: <1021841986.24318.2803.camel@space-ghost> Reply-To: Miles Bader NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1021853162 11739 127.0.0.1 (20 May 2002 00:06:02 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 20 May 2002 00:06:02 +0000 (UTC) Cc: 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 179agc-00033B-00 for ; Mon, 20 May 2002 02:06:02 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 179auI-0006FX-00 for ; Mon, 20 May 2002 02:20:11 +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 179agw-00072N-00; Sun, 19 May 2002 20:06:22 -0400 Original-Received: from smtp02.fields.gol.com ([203.216.5.132]) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 179afq-0006yO-00; Sun, 19 May 2002 20:05:14 -0400 Original-Received: from tc-2-210.kawasaki.gol.ne.jp ([203.216.25.210] helo=tc-1-100.kawasaki.gol.ne.jp) by smtp02.fields.gol.com with esmtp (Magnetic Fields) id 179afo-0000XK-00; Mon, 20 May 2002 09:05:13 +0900 Original-Received: by tc-1-100.kawasaki.gol.ne.jp (Postfix, from userid 1000) id 030A930B3; Mon, 20 May 2002 09:05:10 +0900 (JST) Original-To: Colin Walters System-Type: i686-pc-linux-gnu In-Reply-To: <1021841986.24318.2803.camel@space-ghost> Original-Lines: 14 X-Abuse-Complaints: abuse@gol.com 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:4150 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4150 Colin Walters writes: > > An example: my .emacs needs to, say, (add-hook 'foo-mode-hook... ), > > but the hook may not be defined, so i (defvar foo-mode-hook) before > > this statement. > > Why do you defvar it? The best solution is to (require 'foo-mode) > before adding the hook. But `add-hook' won't lose if the hook isn't > bound yet. ...and the above defvar won't bind it anyway... -Miles -- I'd rather be consing.