emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: add-hook and defvar


From: Artur Malabarba
Subject: Re: add-hook and defvar
Date: Mon, 23 Feb 2015 05:10:10 +0000


On Feb 22, 2015 4:18 PM, "Stefan Monnier" <address@hidden> wrote:
>
> > There's also the disadvantage that it adds a symbol-property check to
> > every `defvar' call.
>
> That's a fairly significant disadvantage.

Yes. We can also just throw an error if the variable isn't defined, like every other function out there.

We can do that as a new function, `add-to-hook', and slowly obsolete add-hook.

> Another problem is that defvar may simply never be called.

But isn't it a bug to run-hooks a variable that was never explicitly defined?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]