]> git.eshelyaron.com Git - emacs.git/commitdiff
(font-lock-make-faces): Redo logic for whether
authorRichard M. Stallman <rms@gnu.org>
Fri, 21 Jul 1995 05:05:49 +0000 (05:05 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 21 Jul 1995 05:05:49 +0000 (05:05 +0000)
to call font-lock-make-face for a given face.

lisp/font-lock.el

index 51cdb033d283f370c004973f1c74831d109ed506..2b5f603973f2b90f52fd8f033799090c79cbef12 100644 (file)
@@ -307,12 +307,12 @@ See `font-lock-make-face' and `list-faces-display'."
   ;; Now make the faces if we have to.
   (mapcar (function (lambda (face-attributes)
             (let ((face (nth 0 face-attributes)))
-              (if (and (not override) (facep face))
-                  ;; The face exists.  Only set the variable if it's nil.
-                  (if (or (not (boundp face)) (symbol-value face))
-                      (set face face))
-                ;; The face doesn't exist or we can stomp all over it anyway.
-                (font-lock-make-face face-attributes)))))
+               (if override
+                   (font-lock-make-face face-attributes)
+                 (if (not (and (boundp face) (facep (symbol-value face))))
+                     (if (facep face)
+                         (set face face)
+                       (font-lock-make-face face-attributes)))))))
          font-lock-face-attributes))
 
 (defun font-lock-make-face (face-attributes)