unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Combining Faces
@ 2007-11-12 17:04 Florian Beck
  0 siblings, 0 replies; only message in thread
From: Florian Beck @ 2007-11-12 17:04 UTC (permalink / raw)
  To: help-gnu-emacs

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-11-12 17:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-12 17:04 Combining Faces Florian Beck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).