diff options
| author | Stefan Monnier | 2004-10-10 01:54:12 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2004-10-10 01:54:12 +0000 |
| commit | 6b7f34912cd54750971e410dd596fb8b4df7953c (patch) | |
| tree | 60bbbc8b0b6dc8081a455fe341bc883fe894e384 | |
| parent | 1f4cc034320bca5b4a8e6e69da8553ba33d36a8d (diff) | |
| download | emacs-6b7f34912cd54750971e410dd596fb8b4df7953c.tar.gz emacs-6b7f34912cd54750971e410dd596fb8b4df7953c.zip | |
(font-lock-apply-highlight): Explicitly check the case
where the face expression evals to nil.
| -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'." | |||
| 1324 | (add-text-properties start end (cddr val)) | 1324 | (add-text-properties start end (cddr val)) |
| 1325 | (setq val (cadr val))) | 1325 | (setq val (cadr val))) |
| 1326 | (cond | 1326 | (cond |
| 1327 | ((not val) | ||
| 1328 | ;; If `val' is nil, don't do anything. It is important to do it | ||
| 1329 | ;; explicitly, because when adding nil via things like | ||
| 1330 | ;; font-lock-append-text-property, the property is actually | ||
| 1331 | ;; changed from <face> to (<face>) which is undesirable. --Stef | ||
| 1332 | nil) | ||
| 1327 | ((not override) | 1333 | ((not override) |
| 1328 | ;; Cannot override existing fontification. | 1334 | ;; Cannot override existing fontification. |
| 1329 | (or (text-property-not-all start end 'face nil) | 1335 | (or (text-property-not-all start end 'face nil) |