all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Miles Bader <miles@gnu.org>
Cc: bob@rattlesnake.com, emacs-devel@gnu.org,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	miles@gnu.org
Subject: Re: +face-remapping-20040505-0.patch
Date: Fri, 7 May 2004 21:39:40 -0400	[thread overview]
Message-ID: <20040508013940.GB6489@fencepost> (raw)
In-Reply-To: <E1BMGW1-0000zJ-Hm@fencepost.gnu.org>

On Fri, May 07, 2004 at 09:20:33PM -0400, Richard Stallman wrote:
>     >> This specification uses the first face in the list, NEW-FACE, last.  I
>     >> think it should use these faces in the order they appear.
> 
>     It should work the same way as when a list of faces is specified in the
>     `face' property, shouldn't it ?
> 
> I think we're saying the same thing in different words.

I'm not sure.

The code currently uses the same function that face-inheritance uses (a
face's :inherit attribute may be a list).  Unfortunately, the manner in which
that works is the _opposite_ of how a list of faces in a face property works.

 * In a face property, a list of faces is interpreted so that earlier faces in
   the list _override_ later faces in the list.

 * In an face-inheritance list, _later_ faces override earlier faces.

E.g., for a face property, the following face list:

   (variable-pitch fixed pitch)

will result in the display being `variable-pitch', but if the _same_ list
occurs in a face-inheritance property, the display will use `fixed-pitch'!

I'm not sure what to do about this; both behaviors kind of make sense.  The
:inherit behavior is somewhat closer to the implementation -- it just says
`merge these faces one by one' -- whereas perhaps the face-property behavior
of preferring earlier faces could seem more natural when viewed abstractly,
but is actually a bit more of a pain to implement (it uses recursion to apply
the face list in reverse order).

Use the same code as the face-property for `face-remapping-alist' would have
the advantage that you could use other `magic' face-property values for free,
e.g. directly embedded attributes like (:foreground "green"), but if that
were the case maybe the name `face-remapping-alist' would be slightly wrong?

Along the same lines, perhaps one or the other of the two existing types of
face-lists should be changed to be consistant with the other -- but which
one?

Any thoughts?

Thanks,

-Miles
-- 
Would you like fries with that?

  reply	other threads:[~2004-05-08  1:39 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-04 15:44 +face-remapping-20040505-0.patch Miles Bader
2004-05-05 20:20 ` +face-remapping-20040505-0.patch Richard Stallman
2004-05-05 22:12   ` +face-remapping-20040505-0.patch Miles Bader
2004-05-06 14:05     ` +face-remapping-20040505-0.patch Stefan Monnier
2004-05-08  1:20       ` +face-remapping-20040505-0.patch Richard Stallman
2004-05-08  1:39         ` Miles Bader [this message]
2004-05-09 10:38           ` +face-remapping-20040505-0.patch Richard Stallman
2004-05-09 16:42             ` +face-remapping-20040505-0.patch Stefan Monnier
2004-05-10  0:00               ` +face-remapping-20040505-0.patch Richard Stallman
2004-05-10  0:17                 ` +face-remapping-20040505-0.patch Stefan Monnier
2004-05-10 17:54                   ` +face-remapping-20040505-0.patch Richard Stallman
2004-05-10 18:25                     ` +face-remapping-20040505-0.patch Stefan Monnier
2004-05-10 22:33                       ` +face-remapping-20040505-0.patch Miles Bader
2004-05-10 23:08                         ` +face-remapping-20040505-0.patch Stefan Monnier
2004-05-11  4:47                           ` +face-remapping-20040505-0.patch Miles Bader
2004-05-11 16:30                           ` +face-remapping-20040505-0.patch Kevin Rodgers
2004-05-12  1:30                             ` +face-remapping-20040505-0.patch Miles Bader
2004-05-10  0:42             ` +face-remapping-20040505-0.patch Miles Bader
2004-05-10 17:54               ` +face-remapping-20040505-0.patch Richard Stallman
2004-05-13 21:28                 ` +face-remapping-20040505-0.patch Miles Bader
2004-05-24  8:04                   ` +face-remapping-20040505-0.patch Kim F. Storm
2004-05-24  8:15 ` +face-remapping-20040505-0.patch Kim F. Storm
2004-05-24  8:48   ` +face-remapping-20040505-0.patch Miles Bader
2004-05-24 10:03     ` +face-remapping-20040505-0.patch Kim F. Storm
2004-05-24 10:24       ` +face-remapping-20040505-0.patch David Kastrup
2004-05-24 17:35         ` +face-remapping-20040505-0.patch Richard Stallman

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=20040508013940.GB6489@fencepost \
    --to=miles@gnu.org \
    --cc=bob@rattlesnake.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.