bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#21311: 25.0.50; non-defvared hooks are not declared special with lex


From: Tassilo Horn
Subject: bug#21311: 25.0.50; non-defvared hooks are not declared special with lexical-binding
Date: Fri, 21 Aug 2015 17:40:32 +0200
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> It seems that hooks that are not declared using defvar but come into
>> being just because of a (add-hook 'my-hook ...) are not declared as
>> special meaning you cannot let-bind them to change their value in the
>> dynamic scope of the let.
>
> Yes.
>
>> The bug disappears as soon as I
>>   - don't use lexical-binding, or
>>   - defvar the hook (Fix #1 or #2)
>
> I think either of fix #1 or #2 are proper fixes and I think there's not
> much more we can do about it.

Allright.

> Arguably, nowadays packages should defvar all their hooks.

Ok, then I'll issue a bug report for magit.  That's the package whose
non-defvared hook I wanted to let-bind.

Bye,
Tassilo





reply via email to

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