GNU bug report logs -
#46302
28.0.50; cperl-mode cleanup: Eliminate dead code
Previous Next
Reported by: haj <at> posteo.de (Harald Jörg)
Date: Thu, 4 Feb 2021 19:22:02 UTC
Severity: normal
Tags: fixed
Found in version 28.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #21 received at 46302 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>> Isn't `make-obsolete-variable` supposed to generate a compiler warning?
>
> It is supposed to, but somehow it didn't... [...]
>
> Hm... perhaps it's because of this?
>
> - (if cperl-use-syntax-table-text-property
> - (if (eval-when-compile (fboundp 'syntax-propertize-rules))
> - (progn
>
> And the compiler got confused and didn't output a warning (always)?
Ah, that reminds me of something... I did the elimination in several
steps, and in one of them killed the conditional and the if-branch, but
forget to kill the else-branch as well. Apparently I ran the first
compilation test with that (bogus) intermediate version, and got the
warning.
As it turns out, the byte compiler shortcuts the conditional if it
eval-when-compiles to a constant and doesn't even touch the else-branch.
Digging into the commit logs reveals:
commit 4813c453b22ff7b965e31a30d35b70f73d6bcbc7
Author: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date: Sun Feb 3 10:47:12 2013 -0500
* lisp/progmodes/cperl-mode.el (cperl-mode): Avoid byte-compile
warning.
Now it all makes sense :)
--
Cheers,
haj
This bug report was last modified 4 years and 158 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.