diff options
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/font-lock.el | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5da1bb7b6c6..0ab19236752 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2007-12-29 Richard Stallman <rms@gnu.org> | 1 | 2007-12-29 Richard Stallman <rms@gnu.org> |
| 2 | 2 | ||
| 3 | * font-lock.el (font-lock-prepend-text-property) | ||
| 4 | (font-lock-append-text-property): Canonicalize the face and | ||
| 5 | font-lock-face properties. | ||
| 6 | |||
| 3 | * faces.el (facep): Doc fix. | 7 | * faces.el (facep): Doc fix. |
| 4 | 8 | ||
| 5 | * startup.el (fancy-startup-tail, fancy-about-text) | 9 | * startup.el (fancy-startup-tail, fancy-about-text) |
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 6bc5fd8716f..bc7e7f1e325 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -1295,6 +1295,12 @@ Optional argument OBJECT is the string or buffer containing the text." | |||
| 1295 | (while (/= start end) | 1295 | (while (/= start end) |
| 1296 | (setq next (next-single-property-change start prop object end) | 1296 | (setq next (next-single-property-change start prop object end) |
| 1297 | prev (get-text-property start prop object)) | 1297 | prev (get-text-property start prop object)) |
| 1298 | ;; Canonicalize old forms of face property. | ||
| 1299 | (and (memq prop '(face font-lock-face)) | ||
| 1300 | (listp prev) | ||
| 1301 | (or (keywordp (car prev)) | ||
| 1302 | (memq (car prev) '(foreground-color background-color))) | ||
| 1303 | (setq prev (list prev))) | ||
| 1298 | (put-text-property start next prop | 1304 | (put-text-property start next prop |
| 1299 | (append val (if (listp prev) prev (list prev))) | 1305 | (append val (if (listp prev) prev (list prev))) |
| 1300 | object) | 1306 | object) |
| @@ -1309,6 +1315,12 @@ Optional argument OBJECT is the string or buffer containing the text." | |||
| 1309 | (while (/= start end) | 1315 | (while (/= start end) |
| 1310 | (setq next (next-single-property-change start prop object end) | 1316 | (setq next (next-single-property-change start prop object end) |
| 1311 | prev (get-text-property start prop object)) | 1317 | prev (get-text-property start prop object)) |
| 1318 | ;; Canonicalize old forms of face property. | ||
| 1319 | (and (memq prop '(face font-lock-face)) | ||
| 1320 | (listp prev) | ||
| 1321 | (or (keywordp (car prev)) | ||
| 1322 | (memq (car prev) '(foreground-color background-color))) | ||
| 1323 | (setq prev (list prev))) | ||
| 1312 | (put-text-property start next prop | 1324 | (put-text-property start next prop |
| 1313 | (append (if (listp prev) prev (list prev)) val) | 1325 | (append (if (listp prev) prev (list prev)) val) |
| 1314 | object) | 1326 | object) |