GNU bug report logs -
#21311
25.0.50; non-defvared hooks are not declared special with lexical-binding
Previous Next
Reported by: Tassilo Horn <tsdh <at> gnu.org>
Date: Fri, 21 Aug 2015 12:00:04 UTC
Severity: minor
Found in version 25.0.50
Done: Tassilo Horn <tsdh <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Stefan Monnier <monnier <at> 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
This bug report was last modified 9 years and 279 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.