diff options
-rw-r--r-- | lisp/font-lock.el | 6 |
1 files changed, 6 insertions, 0 deletions
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 <face> to (<face>) which is undesirable. --Stef + nil) ((not override) ;; Cannot override existing fontification. (or (text-property-not-all start end 'face nil) |