[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master dc5e875 1/2: ; cperl-mode: Eliminate fallbacks if font-lock isn't
From: |
Stefan Kangas |
Subject: |
master dc5e875 1/2: ; cperl-mode: Eliminate fallbacks if font-lock isn't loaded |
Date: |
Fri, 11 Dec 2020 14:11:53 -0500 (EST) |
branch: master
commit dc5e8759305a6fcd47d6039d257d4c28a00a9ddf
Author: Harald Jörg <haj@posteo.de>
Commit: Stefan Kangas <stefan@marxist.se>
; cperl-mode: Eliminate fallbacks if font-lock isn't loaded
* lisp/progmodes/cperl-mode.el (cperl-find-pods-heres):
Eliminate conditionals which always evaluate to true if
font-lock is preloaded (since Emacs 22.1). (Bug#45183)
---
lisp/progmodes/cperl-mode.el | 45 +++++++-------------------------------------
1 file changed, 7 insertions(+), 38 deletions(-)
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index ed9b234..ae839a6 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -3473,49 +3473,18 @@ the sections using `cperl-pod-head-face',
`cperl-pod-face',
(font-lock-string-face (if (boundp 'font-lock-string-face)
font-lock-string-face
'font-lock-string-face))
- (my-cperl-delimiters-face (if (boundp 'font-lock-constant-face)
- font-lock-constant-face
- 'font-lock-constant-face))
+ (my-cperl-delimiters-face
+ font-lock-constant-face)
(my-cperl-REx-spec-char-face ; [] ^.$ and wrapper-of ({})
- (if (boundp 'font-lock-function-name-face)
- font-lock-function-name-face
- 'font-lock-function-name-face))
- (font-lock-variable-name-face ; interpolated vars and ({})-code
- (if (boundp 'font-lock-variable-name-face)
- font-lock-variable-name-face
- 'font-lock-variable-name-face))
- (font-lock-function-name-face ; used in `cperl-find-sub-attrs'
- (if (boundp 'font-lock-function-name-face)
- font-lock-function-name-face
- 'font-lock-function-name-face))
- (font-lock-constant-face ; used in `cperl-find-sub-attrs'
- (if (boundp 'font-lock-constant-face)
- font-lock-constant-face
- 'font-lock-constant-face))
+ font-lock-function-name-face)
(my-cperl-REx-0length-face ; 0-length, (?:)etc, non-literal \
- (if (boundp 'font-lock-builtin-face)
- font-lock-builtin-face
- 'font-lock-builtin-face))
- (font-lock-comment-face
- (if (boundp 'font-lock-comment-face)
- font-lock-comment-face
- 'font-lock-comment-face))
- (font-lock-warning-face
- (if (boundp 'font-lock-warning-face)
- font-lock-warning-face
- 'font-lock-warning-face))
+ font-lock-builtin-face)
(my-cperl-REx-ctl-face ; (|)
- (if (boundp 'font-lock-keyword-face)
- font-lock-keyword-face
- 'font-lock-keyword-face))
+ font-lock-keyword-face)
(my-cperl-REx-modifiers-face ; //gims
- (if (boundp 'cperl-nonoverridable-face)
- cperl-nonoverridable-face
- 'cperl-nonoverridable-face))
+ 'cperl-nonoverridable-face)
(my-cperl-REx-length1-face ; length=1 escaped chars, POSIX classes
- (if (boundp 'font-lock-type-face)
- font-lock-type-face
- 'font-lock-type-face))
+ font-lock-type-face)
(stop-point (if ignore-max
(point-max)
max))