[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: defvar vs setqif..
From: |
Richard Stallman |
Subject: |
Re: defvar vs setqif.. |
Date: |
Mon, 20 May 2002 15:33:22 -0600 (MDT) |
> 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.
That is often a costly solution, because it forces loading of
foo-mode.el. If you package always needs foo-mode, the price must be
paid anyway. But when it does not always need foo-mode, you should
not require it at load time.
Re: defvar vs setqif.., Miles Bader, 2002/05/19