From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs-Devel <emacs-devel@gnu.org>
Subject: Re: bind faces?
Date: Sun, 14 May 2006 09:17:10 -0400 [thread overview]
Message-ID: <87mzdkrbte.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <MEEKKIABFKKDFJMPIOEBGEHCDBAA.drew.adams@oracle.com> (Drew Adams's message of "Sat, 13 May 2006 10:54:24 -0700")
> 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
next prev parent reply other threads:[~2006-05-14 13:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-13 17:54 bind faces? Drew Adams
2006-05-13 18:07 ` Chong Yidong
2006-05-13 19:40 ` Drew Adams
2006-05-14 2:39 ` Richard Stallman
2006-05-14 0:52 ` Miles Bader
2006-05-14 1:02 ` Drew Adams
2006-05-14 2:16 ` Miles Bader
2006-05-14 3:13 ` Drew Adams
2006-05-14 4:10 ` David Kastrup
2006-05-14 2:33 ` Miles Bader
2006-05-14 13:17 ` Stefan Monnier [this message]
2006-05-14 14:32 ` Drew Adams
2006-05-14 14:46 ` Miles Bader
2006-05-14 16:13 ` Drew Adams
2006-05-14 17:49 ` Stefan Monnier
2006-05-14 18:43 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mzdkrbte.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).