GNU bug report logs -
#5950
defvaralias after defvar should be warned in runtime
Previous Next
Reported by: irieshinsuke <at> yahoo.co.jp
Date: Thu, 15 Apr 2010 05:15:02 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 27.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 5950 <at> debbugs.gnu.org (full text, mbox):
>> I think the byte-hunk-handler should be put to `defvaralias' rather than
>> `define-obsolete-variable-alias'. `defvaralias' is a primitive function
>> which causes the problem in `define-obsolete-variable-alias' macro.
> The issue _is_ with defvaralias, but it's only a problem for user
> options, things that might be set in .emacs before the associated
> alias definition is evaluated. It's hard to see why there should be
> non-obsolete aliases to user options, it just causes confusion. I
> think there would be false positives if the warning was associated
> with defvaralias, which is mostly used with non-user-options, I would
> think.
> The last time a similar issue came up, Stefan preferred that only
> define-obsolete-variable-alias be changed; see
Well, in this case I'd rather check defvaralias, since the problem is
there: if (defvaralias 'foo 'bar) is executed after both `foo' and `bar'
have been given values, then it will necessarily have to drop one of the
two, which is the source of the problem.
Changing defvaralias to try and be more clever would definitely
be wrong. But changing it to output a warning about the problematic
situation would be OK and changing the byte-compiler to output a warning
in cases that make such a situation more likely is also perfectly good.
Stefan
This bug report was last modified 6 years and 298 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.