unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* bind faces?
@ 2006-05-13 17:54 Drew Adams
  2006-05-13 18:07 ` Chong Yidong
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Drew Adams @ 2006-05-13 17:54 UTC (permalink / raw


I think the answer to this is "no", but I'm not sure:

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))

Wouldn't it be useful to be able to do that? We have `let' for variables and
`flet' (via cl.el) for functions, but nothing for faces, IIUC. (Obviously, a
user could work with face variables, but those are not always available and
their use is generally discouraged.)

What is a good way to get such a result currently (i.e. a workaround)? Say
that you want to temporarily make face `x' have all the properties of face
`y'. How would you do that? unwind-protect + defface + defface back again?
Or unwind-protect + loop over all face attributes of `y', assigning them to
`x', then putting back `x's original attributes?

Is there an easy/elegant way to do this?

A special case would be to "wipe out" a face (make it invisible/unnoticable)
temporarily, giving its properties (e.g. fore/background) nil values. Is
there perhaps a good workaround for this special case?

A related feature would be to be able to make an overlay's face
unnoticeable. Not to use the `invisible' property, which hides the text, and
not to delete the overlay, but just to make the face itself
transparent/unnoticeable (e.g. temporarily).

I'm asking here instead of help-gnu-emacs because I suspect there is no easy
way to do this and, if so, I'd propose that we think about creating one
(after the release, of course). Also, in case I'm missing something or
misunderstanding faces or overlays, I know that folks here will help me see
the light. I'd like to know if there is a better way to accomplish what I'm
asking about than fiddling with face properties. Thx.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2006-05-14 18:43 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).