[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fwd: overlay face property not used for after-string property
From: |
Johan Bockgård |
Subject: |
Re: Fwd: overlay face property not used for after-string property |
Date: |
Sun, 28 Oct 2007 16:21:11 +0100 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) |
Joe Wells <address@hidden> writes:
> Also, fixing this issue this way leaves behind the difficulty of
> adding a face property manually to a property string (before-string,
> after-string, or display) which already has face properties.
In font-lock.el we find
;;; Additional text property functions.
;; The following text property functions should be builtins. This
;; means they should be written in C and put with all the other text
;; property functions. In the meantime, those that are used by
;; font-lock.el are defined in Lisp below and given a `font-lock-'
;; prefix. Those that are not used are defined in Lisp below and
;; commented out. sm.
(defun font-lock-prepend-text-property ([...])
"Prepend to one property of the text from START to END.
Arguments PROP and VALUE specify the property and value to prepend
to the value already in place. The resulting property values are
always lists. Optional argument OBJECT is the string or buffer
containing the text."
[...]
(let ((s (propertize "abc" 'face 'bar)))
(font-lock-prepend-text-property 1 2 'face 'foo s)
s)
=> #("abc" 0 1 (face bar) 1 2 (face (foo bar)) 2 3 (face bar))
--
Johan Bockgård