]> git.eshelyaron.com Git - emacs.git/commitdiff
; cperl-mode: Eliminate fallbacks if font-lock isn't loaded
authorHarald Jörg <haj@posteo.de>
Fri, 11 Dec 2020 16:48:30 +0000 (17:48 +0100)
committerStefan Kangas <stefan@marxist.se>
Fri, 11 Dec 2020 19:09:44 +0000 (20:09 +0100)
* 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

index ed9b234d69c7f9b73f0108b8f449e20f55728a08..ae839a662201a1ba4f028348a4fe8a709b367853 100644 (file)
@@ -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))