From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Florian Beck Newsgroups: gmane.emacs.help Subject: Combining Faces Date: Mon, 12 Nov 2007 18:04:07 +0100 Message-ID: <874pfrbdko.fsf@sophokles.streitblatt.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1194887451 7214 80.91.229.12 (12 Nov 2007 17:10:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Nov 2007 17:10:51 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 12 18:10:54 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IrcoI-0001ZM-6Q for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Nov 2007 18:10:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Irco5-0003FX-KM for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Nov 2007 12:10:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Irchx-0002Ow-10 for help-gnu-emacs@gnu.org; Mon, 12 Nov 2007 12:04:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ircho-0002C2-OC for help-gnu-emacs@gnu.org; Mon, 12 Nov 2007 12:04:16 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ircho-0002BV-CJ for help-gnu-emacs@gnu.org; Mon, 12 Nov 2007 12:04:12 -0500 Original-Received: from mo-p07-ob.rzone.de ([81.169.146.188]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Irchn-0005rO-PN for help-gnu-emacs@gnu.org; Mon, 12 Nov 2007 12:04:12 -0500 Original-Received: from localhost (p5499419F.dip.t-dialin.net [84.153.65.159]) by post.webmailer.de (fruni mo18) (RZmta 14.0) with ESMTP id 502181jACFXLRd for ; Mon, 12 Nov 2007 18:04:09 +0100 (MET) (envelope-from: ) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.60 (gnu/linux) X-RZG-AUTH: z4gQVF2k7GqAyN1G8LetzW5h4Co= X-RZG-CLASS-ID: mo07 X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:49161 Archived-At: 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