[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mixing named and anonymous faces in text properties
From: |
Stefan Monnier |
Subject: |
Re: Mixing named and anonymous faces in text properties |
Date: |
Fri, 26 Apr 2019 12:39:33 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> - M-: (add-text-properties 1 3 '(face '(italic :weight bold))) RET
This is wrong. It should be
(add-text-properties 1 3 '(face '(italic (:weight bold))))
I.e. a face property ca hold either a "face" or a list of "face"s,
where "face" can be either a symbol or a plist of face attributes.
So you can set the `face` property to
italic
(:weight bold)
(italic (:weight bold))
((:weight bold) italic)
(italic)
...
but if the value you used above did what you intended, it's just
a lucky accident.
Stefan