From: Pascal Bourguignon <spam@mouse-potato.com>
Subject: Re: Can a face have different attributes in different buffers?
Date: 23 Jan 2005 01:02:13 +0100 [thread overview]
Message-ID: <87u0p9nhbu.fsf@thalassa.informatimago.com> (raw)
In-Reply-To: csun76$k8j$1@rainier.uits.indiana.edu
Yevgeniy Makarov <emakarov@cs.indiana.edu> writes:
> Hello,
>
> I have the following question. Judging by the fact that the function which
> sets an attribute of some face (set-face-attribute) takes a frame as an
> argument, it is not possible to have different buffers in one frame with
> different values of the same attribute. Is it so? For example, can I have
> comments of different colors (attribute :foreground of face
> font-lock-comment-face) in different buffers of the same frame?
I don't think that's possible. Faces are referenced thru
symbols. Ie. the way it is implemented, faces are not first class
objects, they're attributes of symbols. Symbols aren't specific to a
buffer.
The best you could do is to create new faces for each buffer, copying
the faces you want onto new gensym'ed symbols and refering them thru
buffer-local variables. Of course, since normal font-locking code
refers the faces "literally" thru the symbols they use, you'd have to
patch them or program your own font-locking.
--
__Pascal Bourguignon__ http://www.informatimago.com/
The mighty hunter
Returns with gifts of plump birds,
Your foot just squashed one.
next prev parent reply other threads:[~2005-01-23 0:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-22 23:22 Can a face have different attributes in different buffers? Yevgeniy Makarov
2005-01-23 0:02 ` Pascal Bourguignon [this message]
2005-01-23 2:19 ` Johan Bockgård
2005-01-23 5:09 ` Yevgeniy Makarov
2005-01-24 17:31 ` Kevin Rodgers
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87u0p9nhbu.fsf@thalassa.informatimago.com \
--to=spam@mouse-potato.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.