[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: composing faces
From: |
David Kastrup |
Subject: |
Re: composing faces |
Date: |
Fri, 17 Nov 2006 21:32:05 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.90 (gnu/linux) |
Perry Smith <pedz@easesoftware.com> writes:
> On Nov 17, 2006, at 1:08 PM, David Abrahams wrote:
>
>
>
> Is there a way to define a new face that's exactly like some other
> face, except for certain changes? For example, I'd like to build a
> face that's exactly font-lock-variable-name-face, except that it's
> always italic.
>
>
> (copy-face 'font-lock-variable-name-face 'my-new-face)
> (set-face-attribute 'my-new-face nil :italic t)
I think that one should get by without copying, using something like
(defface my-new-face ((:default :inherit font-lock-variable-name-face
:italic t)))
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum