GNU bug report logs - #43622
28.0.50; [CLEANUP][PATCH] cperl-mode: Eliminate dead code

Previous Next

Package: emacs;

Reported by: Harald Jörg <haj <at> posteo.de>

Date: Sat, 26 Sep 2020 00:36:01 UTC

Severity: normal

Tags: fixed, patch

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 #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Harald Jörg <haj <at> posteo.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; [CLEANUP][PATCH] cperl-mode: Eliminate dead code
Date: Sat, 26 Sep 2020 02:35:15 +0200
[Message part 1 (text/plain, inline)]
As recently discussed on the emacs-devel list, I'd like to eradicate
conditional code from cperl-mode where the conditionals evaluate to nil.

This is a rather large part of the cleanup, related to all that stuff
which has changed in the last years with regard to font-lock-mode and
cperl-mode's homegrown fontification based on features which are no
longer available.

I tested Perl code on my repositories (twiki.org code and
https://github.com/act-psgi/Act), written by different authors in
different styles, and could not find any change in fontification.

The conditionals leading to dead code are:

 - (featurep 'choose-color) is nil
 - (featurep 'font-lock-extra) is nil
 - (facep 'font-lock-constant-face) is t and
   (boundp 'font-lock-constant-face) is t
   ...same for other faces provided by font-lock-mode.

Once this dead code is eliminated, the macro cperl-force-face and the
function cperl-init-faces-weak (both undocumented) lose their purpose
and are also deleted.

There should be no user-visible changes, so I have made no entry in
etc/NEWS.
--
Cheers,
haj
[0001-cperl-mode-Delete-conditional-code-where-conditions-.patch (text/x-patch, attachment)]

This bug report was last modified 4 years and 234 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.