summaryrefslogtreecommitdiff
path: root/lisp/font-lock.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2008-01-02 02:20:42 +0000
committerMiles Bader <miles@gnu.org>2008-01-02 02:20:42 +0000
commitb201b9880e01120b7e64f82c98464c5bea630b0d (patch)
tree8205967f8225afc15b26f7fb630ec4e6b4ef87ea /lisp/font-lock.el
parent42a0a13593c252378b8d6eecd97b7971ebd6808a (diff)
parent76564e7ce3b5e888e3260dd3510c3cf1a254f7da (diff)
downloademacs-b201b9880e01120b7e64f82c98464c5bea630b0d.tar.gz
Merge from emacs--rel--22, gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-975
Diffstat (limited to 'lisp/font-lock.el')
-rw-r--r--lisp/font-lock.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 76f3da98bec..96306be2215 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1303,6 +1303,12 @@ Optional argument OBJECT is the string or buffer containing the text."
(while (/= start end)
(setq next (next-single-property-change start prop object end)
prev (get-text-property start prop object))
+ ;; Canonicalize old forms of face property.
+ (and (memq prop '(face font-lock-face))
+ (listp prev)
+ (or (keywordp (car prev))
+ (memq (car prev) '(foreground-color background-color)))
+ (setq prev (list prev)))
(put-text-property start next prop
(append val (if (listp prev) prev (list prev)))
object)
@@ -1317,6 +1323,12 @@ Optional argument OBJECT is the string or buffer containing the text."
(while (/= start end)
(setq next (next-single-property-change start prop object end)
prev (get-text-property start prop object))
+ ;; Canonicalize old forms of face property.
+ (and (memq prop '(face font-lock-face))
+ (listp prev)
+ (or (keywordp (car prev))
+ (memq (car prev) '(foreground-color background-color)))
+ (setq prev (list prev)))
(put-text-property start next prop
(append (if (listp prev) prev (list prev)) val)
object)