]> git.eshelyaron.com Git - emacs.git/commitdiff
(font-lock-apply-highlight): Explicitly check the case
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 10 Oct 2004 01:54:12 +0000 (01:54 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 10 Oct 2004 01:54:12 +0000 (01:54 +0000)
where the face expression evals to nil.

lisp/font-lock.el

index 052e92391af09f5b7d2d090edf65a04506ccb7b5..56a4005a41cbf7ecef7884ae8dbdfaacd064ca80 100644 (file)
@@ -1324,6 +1324,12 @@ HIGHLIGHT should be of the form MATCH-HIGHLIGHT, see `font-lock-keywords'."
          (add-text-properties start end (cddr val))
          (setq val (cadr val)))
        (cond
+        ((not val)
+         ;; If `val' is nil, don't do anything.  It is important to do it
+         ;; explicitly, because when adding nil via things like
+         ;; font-lock-append-text-property, the property is actually
+         ;; changed from <face> to (<face>) which is undesirable.  --Stef
+         nil)
         ((not override)
          ;; Cannot override existing fontification.
          (or (text-property-not-all start end 'face nil)