bug-gnu-emacs
[Top][All Lists]
Advanced

[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 18:35:04 +0100

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

    >> From: address@hidden (David Kastrup) Date: 28 Oct
    >> 2001 16:54:18 +0100
    >> 
    >> Contrary to its description, inverting a face with
    >> non-specified back- and foreground colours does nothing.

    Eli> On X, on a tty, or both?

Anywhere.

    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> Perhaps you could post a specific recipe to reproduce this?

(defface 'junk-face '((t nil)) "An example to please Eli.")
(invert-face 'junk-face)

junk-face will be just the same after "inversion" as before.

> -    (if (or fg bg)
> +    (if (or (not (eq fg 'unspecified))
> +         (not (eq bg 'unspecified)))

    Eli> Hmm... What about "unspecified-bg" etc.?

Uh, what about it?  Something like that is nowhere mentioned in the
Elisp manual.  Have you just invented it? Why?

    Eli> Anyway, I don't understand why is this needed, so my question
    Eli> might not be relevant.

It is needed because unspecified face attributes are not indicated by
them being nil, but by them being 'unspecified, the Lisp symbol
'unspecified.  Read the Elisp manual if you don't believe me or try it
out.

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



reply via email to

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