From: Stefan Monnier Date: Sun, 10 Oct 2004 01:54:12 +0000 (+0000) Subject: (font-lock-apply-highlight): Explicitly check the case X-Git-Tag: ttn-vms-21-2-B4~4643 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6b7f34912cd54750971e410dd596fb8b4df7953c;p=emacs.git (font-lock-apply-highlight): Explicitly check the case where the face expression evals to nil. --- diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 052e92391af..56a4005a41c 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -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 to () which is undesirable. --Stef + nil) ((not override) ;; Cannot override existing fontification. (or (text-property-not-all start end 'face nil)