diff lisp/font-lock.el @ 57416:05afd8f1212e

(font-lock-apply-highlight): Explicitly check the case where the face expression evals to nil.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sun, 10 Oct 2004 01:54:12 +0000
parents 7a0ad15724f6
children 1b88b2a7544f
line wrap: on
line diff
--- a/lisp/font-lock.el	Sun Oct 10 01:51:34 2004 +0000
+++ b/lisp/font-lock.el	Sun Oct 10 01:54:12 2004 +0000
@@ -1324,6 +1324,12 @@
 	  (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)