[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Buffer-local faces
From: |
Miles Bader |
Subject: |
Re: Buffer-local faces |
Date: |
Mon, 3 May 2004 19:19:27 -0400 |
User-agent: |
Mutt/1.3.28i |
On Mon, May 03, 2004 at 06:20:46PM -0400, Richard Stallman wrote:
> Each element is of the form:
> (FACE . NEW-FACE)
> or
> (FACE NEW-FACE MERGE-FACE...),
> which causes NEW-FACE to be used where FACE normally would.
> If present, MERGE-FACE... are merged during display with NEW-FACE.
>
> Wouldn't it be cleaner just to have one kind of element,
> (FACE REPLACEMENT-FACES...)
I think so, but I'm not entirely sure if it's possible; perhaps it is.
The question is whether there are places that want remapping, but don't
operate in terms of face-ids -- e.g., they use `lisp-faces' (lisp vectors),
or face names. Face-ids can represent merged faces, but the other
representations can not, so my original thought while implementing this was
that I'd need to support the concept of a `simple remapping' that merely
returned one face name/vector for another.
However that may actually not be necessary. I still have to go through the
corner cases I think.
A related questions is whether the remapping should be visible to lisp code
using face functions. For instance, does (face-attribute 'default :family)
1. return the remapped family, or 2. return the family of the `underlying'
default face?
My current patch does the former, but now I'm leaning towards making it the
latter, and having remapping be a pure display operation -- it just seems
simpler to deal with. Lisp code that's interested in such matters can look
at the variable to see what's up.
-Miles
--
`Cars give people wonderful freedom and increase their opportunities.
But they also destroy the environment, to an extent so drastic that
they kill all social life' (from _A Pattern Language_)
- Buffer-local faces, Miles Bader, 2004/05/03
- Re: Buffer-local faces, Miles Bader, 2004/05/03
- Re: Buffer-local faces, Richard Stallman, 2004/05/03
- Re: Buffer-local faces,
Miles Bader <=
- Re: Buffer-local faces, Stefan Monnier, 2004/05/03
- Re: Buffer-local faces, Miles Bader, 2004/05/03
- Re: Buffer-local faces, Juri Linkov, 2004/05/04
- Re: Buffer-local faces, Miles Bader, 2004/05/04
- Re: Buffer-local faces, Stefan Monnier, 2004/05/04
- Re: Buffer-local faces, Miles Bader, 2004/05/04
- Re: Buffer-local faces, Stefan Monnier, 2004/05/04