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

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

Re: Making text invisible


From: David Kastrup
Subject: Re: Making text invisible
Date: Sat, 31 Dec 2005 22:30:42 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Bill Wohler <wohler@newt.com> writes:

> I'd like to make some text invisible. I do want to use defface since
> the user might not want this text to be invisible. I just want the
> default to be invisible.
>
> One thing I thought of was to define the text's face with the same
> foreground as the default's background, as in:
>
>     (defface mh-folder-sent-to-me-hint
>       '((t
>          (:foreground (face-attribute 'default :background)))))
>
> Unfortunately, defface expects the color to be a string.
>
> Thoughts?

(defface mh-folder-sent-to-me-hint
  `((t
      (:foreground ,(face-attribute 'default :background)))))

That takes the current default background color.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

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