From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: bind faces? Date: Sun, 14 May 2006 09:17:10 -0400 Message-ID: <87mzdkrbte.fsf-monnier+emacs@gnu.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1147612654 19095 80.91.229.2 (14 May 2006 13:17:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 14 May 2006 13:17:34 +0000 (UTC) Cc: Emacs-Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 14 15:17:31 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FfGTP-000692-3u for ged-emacs-devel@m.gmane.org; Sun, 14 May 2006 15:17:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FfGTO-0005IT-Dm for ged-emacs-devel@m.gmane.org; Sun, 14 May 2006 09:17:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FfGTC-0005Ha-0e for emacs-devel@gnu.org; Sun, 14 May 2006 09:17:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FfGTA-0005GY-Fy for emacs-devel@gnu.org; Sun, 14 May 2006 09:17:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FfGTA-0005GP-Ae for emacs-devel@gnu.org; Sun, 14 May 2006 09:17:12 -0400 Original-Received: from [209.226.175.54] (helo=tomts10-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FfGVM-0001nC-Ad for emacs-devel@gnu.org; Sun, 14 May 2006 09:19:28 -0400 Original-Received: from alfajor ([70.55.144.14]) by tomts10-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060514131711.ZPTS20622.tomts10-srv.bellnexxia.net@alfajor>; Sun, 14 May 2006 09:17:11 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id CA238D7754; Sun, 14 May 2006 09:17:10 -0400 (EDT) Original-To: "Drew Adams" In-Reply-To: (Drew Adams's message of "Sat, 13 May 2006 10:54:24 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:54440 Archived-At: > Is there some way to get the effect of "binding" a face to a list of face > properties or the properties of another face? That is, do something akin to > this: > (let ((some-face another-face-or-a-list-of-face-properties)) > (do-something)) I'm not sure what you expect this to do. The lookup to map face names to visual properties is done (repeatedly) during redisplay, so would your let-face binding only affect the visual appearance of the face in the redisplays that take place during `do-something' or would you want the effect to outlive the let? E.g. in the code below: (let-face ((font-lock-string-face :background "red")) (put-text-property 1 5 'face 'font-lock-string-face)) do you expect the chars 1-5 to end up with a red background? If so, it's going to be difficult, because the whole put-text-property expression doesn't currently know it's manipulating any kind of face. Stefan