mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-03 11:33:37 +00:00
(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
@ -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…
Reference in New Issue
Block a user