From: haj@posteo.de (Harald Jörg)
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 46302@debbugs.gnu.org
Subject: bug#46302: 28.0.50; cperl-mode cleanup: Eliminate dead code
Date: Fri, 05 Feb 2021 11:54:37 +0100 [thread overview]
Message-ID: <871rdueqdu.fsf@hajtower> (raw)
In-Reply-To: <871rdunb7f.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 05 Feb 2021 09:57:40 +0100")
Lars Ingebrigtsen <larsi@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@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
next prev parent reply other threads:[~2021-02-05 10:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-04 19:21 bug#46302: 28.0.50; cperl-mode cleanup: Eliminate dead code Harald Jörg
2021-02-04 19:52 ` Lars Ingebrigtsen
2021-02-04 22:28 ` Harald Jörg
2021-02-05 8:57 ` Lars Ingebrigtsen
2021-02-05 10:54 ` Harald Jörg [this message]
2021-02-05 11:03 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871rdueqdu.fsf@hajtower \
--to=haj@posteo.de \
--cc=46302@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.