[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 64d314e0f64 2/2: Prefer defface's ':slant italic' to obsolete
From: |
Eli Zaretskii |
Subject: |
Re: master 64d314e0f64 2/2: Prefer defface's ':slant italic' to obsolete alias ':italic t' |
Date: |
Tue, 21 Jan 2025 21:29:44 +0200 |
> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Tue, 21 Jan 2025 11:15:16 -0800
> Cc: emacs-devel@gnu.org
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Stefan,
> >
> > This (and other similar hunks) doesn't seem right to me:
> >
> >> - '(font-lock-comment-face ((t (:italic t :slant oblique :foreground
> >> "chocolate1"))))
> >> + '(font-lock-comment-face ((t (:slant italic :slant oblique
> >> :foreground "chocolate1"))))
> >> '(font-lock-comment-delimiter-face ((t (:foreground "Salmon"))))
> >> - '(font-lock-doc-face ((t (:italic t :slant oblique :foreground
> >> "LightCoral"))))
> >> + '(font-lock-doc-face ((t (:slant italic :slant oblique
> >> :foreground "LightCoral"))))
> >
> > What do we expect from specifying the same face attribute twice?
>
> I don't know what is the intention here, but what I see is that the
> before case is:
>
> (defface my-testface '((default :italic t :slant oblique)) "")
>
> (face-attribute 'my-testface :slant) ; => oblique
>
> and the after case is:
>
> (defface my-testface '((default :slant italic :slant oblique)) "")
>
> (face-attribute 'my-testface :slant) ; => oblique
>
> So maybe we should just remove the first attribute? It never seems to
> have had an effect anyways.
Of course! Two identical attributes in a row are never useful: the
second on wins.
Thanks.