help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Combining Faces


From: Florian Beck
Subject: Combining Faces
Date: Mon, 12 Nov 2007 18:04:07 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.60 (gnu/linux)

How do I fontify a string that already contains fontification?

This very *sentence*, for example, will yield the following result when
_read_ with =buffer-substring= in muse-mode:

#("\"This very *sentence*, for example, will yield the following result when
_read_ with =buffer-substring= in muse-mode" 0 11 (fontified t
auto-composed t) 11 12 (fontified t invisible muse auto-composed t) 12
20 (fontified t face muse-emphasis-1 auto-composed t) 20 21 (fontified t
invisible muse auto-composed t) 21 73 (fontified t auto-composed t) 73
74 (fontified t invisible muse) 74 78 (fontified t face underline
auto-composed t) 78 79 (fontified t invisible muse auto-composed t) 79
85 (fontified t auto-composed t) 85 86 (fontified t invisible muse
auto-composed t) 86 102 (fontified t face muse-verbatim auto-composed t)
102 103 (fontified t invisible muse auto-composed t) 103 116 (fontified
t auto-composed t))

Now, lets say, I want the whole sentence with yellow foreground. If I
try this:

(add-text-properties 1 117 '(face (:foreground "Yellow"))),

I loose the original faces.

What is the easiest way to apply face properties to a string without
removing face properties already present? How do I handle the case when
not individual properties but a face is set?

-- 
Florian Beck




reply via email to

[Prev in Thread] Current Thread [Next in Thread]