# HG changeset patch # User Stefan Monnier # Date 1097373252 0 # Node ID 05afd8f1212e23d855e447ed362eb517b401f123 # Parent fdd8f0d7c67deb1062f4af7bb5e51069d4c3e586 (font-lock-apply-highlight): Explicitly check the case where the face expression evals to nil. diff -r fdd8f0d7c67d -r 05afd8f1212e lisp/font-lock.el --- 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 to () which is undesirable. --Stef + nil) ((not override) ;; Cannot override existing fontification. (or (text-property-not-all start end 'face nil)