diff options
author | Miles Bader <miles@gnu.org> | 2008-01-02 02:20:42 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2008-01-02 02:20:42 +0000 |
commit | b201b9880e01120b7e64f82c98464c5bea630b0d (patch) | |
tree | 8205967f8225afc15b26f7fb630ec4e6b4ef87ea /lisp/font-lock.el | |
parent | 42a0a13593c252378b8d6eecd97b7971ebd6808a (diff) | |
parent | 76564e7ce3b5e888e3260dd3510c3cf1a254f7da (diff) | |
download | emacs-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.el | 12 |
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) |