(font-lock-prepend-text-property, font-lock-append-text-property):
Canonicalize the face and font-lock-face properties.
This commit is contained in:
parent
20d29b0bbc
commit
4fed1740bd
2 changed files with 16 additions and 0 deletions
|
@ -1,5 +1,9 @@
|
|||
2007-12-29 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* font-lock.el (font-lock-prepend-text-property)
|
||||
(font-lock-append-text-property): Canonicalize the face and
|
||||
font-lock-face properties.
|
||||
|
||||
* faces.el (facep): Doc fix.
|
||||
|
||||
* startup.el (fancy-startup-tail, fancy-about-text)
|
||||
|
|
|
@ -1295,6 +1295,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)
|
||||
|
@ -1309,6 +1315,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)
|
||||
|
|
Loading…
Add table
Reference in a new issue