[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: add-hook and defvar
From: |
Stefan Monnier |
Subject: |
Re: add-hook and defvar |
Date: |
Mon, 09 Mar 2015 22:14:58 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
>> > Is this something the byte compiler could warn about? At least
>> > normal hooks by convention end in "-hook", so a warning could be
>> > emitted every time such a variable is defined that doesn't have nil
>> > as default.
>> Yes, we could do that. Patch welcome,
> Added a patch.
After trying it out, I'm not sure we want it: there are various places
where we use a non-nil default value, and while it's not ideal, it's not
really clear what would be a better choice.
If there was a simple way to silence those warnings in those cases, it's
would be fine, but I can't think of a simple way to do that.
Stefan