[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: invert-face does not invert faces

From: David Kastrup
Subject: Re: invert-face does not invert faces
Date: 28 Oct 2001 22:26:13 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

>>>>> "Eli" == Eli Zaretskii <address@hidden> writes:

    >> From: address@hidden (David Kastrup) Date: 28 Oct
    >> 2001 18:35:04 +0100
    Eli> I don't have access to an X version where I type this, but on
    Eli> a tty, invert-face works for me as advertized, at least for
    Eli> the `default' face.
    >>  The default face hardly qualifies as a face with non-specified
    >> back- and foreground colours.  It is the only face guaranteed
    >> to have everything specified.

    Eli> Not on a tty.  On a tty, the default face has unspecified
    Eli> colors, unless you invoke Emacs with explicit -fg and -bg
    Eli> switches.

No, I just tried it out.  It has the colours "unspecified-bg" and
"unspecified-fg" which are specific, but unknown colors on a tty.  An
unspecified color is indicated by 'unspecified.  If a face defines its
background as "unspecified-bg", this resolves the color (even though
the actual color on the tty is not necessarily known) and no fallback
faces (like in the :inherit face property) will be consulted.  That's
how I understand things.

So I don't see how "unspecified-bg" and "unspecified-fg" would qualify
as something special in the code discussed: interchanging them *will*
invert the face, even though one does not know what exact colors one
is interchanging.

    Eli> I believe you, I just want to understand what you are saying,
    Eli> and I don't always have time to try out everything myself.
    Eli> Would you please help me?

How?  I have explained the problem, I have sent a patch, comparing
with "nil" as in the original code is obviously wrong, since "nil" is
not the way face attributes are declared as 'unspecified.

I have sent you example code (the code with junk-face) which exhibited
the problem.

What else can I do?  Honestly?

David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]