summaryrefslogtreecommitdiff
path: root/lisp/font-lock.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2008-01-02 04:13:39 +0000
committerMiles Bader <miles@gnu.org>2008-01-02 04:13:39 +0000
commit43a8b8ca5797923a7a9848a513ecc8cfff655e17 (patch)
tree1fcd51822e01c6017347954e46b788faa2bf728f /lisp/font-lock.el
parente97d3ec0184763b2479224486e70d23f03bd340f (diff)
parentaacde24f5cdebc6d7ccb2f50a9d8e413906c4497 (diff)
downloademacs-43a8b8ca5797923a7a9848a513ecc8cfff655e17.tar.gz
Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-308
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 f7cc4da0aae..147b98f5a55 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)