aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2007-12-29 19:12:30 +0000
committerRichard M. Stallman2007-12-29 19:12:30 +0000
commit4fed1740bd3d843e21f18b4eac599c203f5378fa (patch)
treef9d8bcf2e0c3b6d12610c52bc0167a7f3c1f2ccf
parent20d29b0bbc8650957cf62643ff8e6683709693c5 (diff)
downloademacs-4fed1740bd3d843e21f18b4eac599c203f5378fa.tar.gz
emacs-4fed1740bd3d843e21f18b4eac599c203f5378fa.zip
(font-lock-prepend-text-property, font-lock-append-text-property):
Canonicalize the face and font-lock-face properties.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/font-lock.el12
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 @@
12007-12-29 Richard Stallman <rms@gnu.org> 12007-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)