From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Colin Walters Newsgroups: gmane.emacs.devel Subject: Re: defvar vs setqif.. Date: 19 May 2002 16:59:46 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: <1021841986.24318.2803.camel@space-ghost> References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1021842913 31217 127.0.0.1 (19 May 2002 21:15:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 19 May 2002 21:15:13 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 179Y1J-00087O-00 for ; Sun, 19 May 2002 23:15:13 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 179YEw-0002LF-00 for ; Sun, 19 May 2002 23:29:18 +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 179Y1M-0002IN-00; Sun, 19 May 2002 17:15:16 -0400 Original-Received: from monk.debian.net ([216.185.54.61] helo=monk.verbum.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 179Xmx-0001As-00 for ; Sun, 19 May 2002 17:00:23 -0400 Original-Received: from space-ghost.verbum.private (freedom.cis.ohio-state.edu [164.107.60.183]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "space-ghost.verbum.org", Issuer "monk.verbum.org" (verified OK)) by monk.verbum.org (Postfix (Debian/GNU)) with ESMTP id D5A4174000BA for ; Sun, 19 May 2002 17:00:22 -0400 (EDT) Original-Received: by space-ghost.verbum.private (Postfix (Debian/GNU), from userid 1000) id B11A2806B92; Sun, 19 May 2002 16:59:46 -0400 (EDT) Original-To: emacs-devel@gnu.org In-Reply-To: X-Mailer: Ximian Evolution 1.0.3 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:4141 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4141 On Sun, 2002-05-19 at 16:44, D. Goel wrote: > 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.