[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#43622: 28.0.50; [CLEANUP][PATCH] cperl-mode: Eliminate dead code
From: |
Harald Jörg |
Subject: |
bug#43622: 28.0.50; [CLEANUP][PATCH] cperl-mode: Eliminate dead code |
Date: |
Sat, 26 Sep 2020 02:35:15 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 |
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
Description: Text Data
- bug#43622: 28.0.50; [CLEANUP][PATCH] cperl-mode: Eliminate dead code,
Harald Jörg <=