[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bind faces?
From: |
Stefan Monnier |
Subject: |
Re: bind faces? |
Date: |
Sun, 14 May 2006 09:17:10 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> 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
Re: bind faces?,
Stefan Monnier <=