[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How can I remove effects of text properties in 'before-string
From: |
Stefan Monnier |
Subject: |
Re: How can I remove effects of text properties in 'before-string |
Date: |
Mon, 23 Oct 2017 08:57:44 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> Hi, thanks for the code. It works! However, I tried to explicited set face
> to '((t (:foreground "magenta" :weight bold :inherit default))
That's not a face. You're confusing the face-spec passed to `defface`
with an actual face.
You can use
(setq ovstring
(propertize "Hi, there!" 'face
'((:foreground "magenta" :weight bold) default)))
tho I'd recommend you use one of
(defface foo-bar
'((t (:foreground "magenta" :weight bold :inherit default))))
[...]
(setq ovstring (propertize "Hi, there!" 'face 'foo-bar))
or
(defface foo-bar
'((t (:foreground "magenta" :weight bold))))
[...]
(setq ovstring (propertize "Hi, there!" 'face '(foo-bar default)))
-- Stefan
- RE: How can I remove effects of text properties in 'before-string, (continued)
Re: How can I remove effects of text properties in 'before-string, Amos Bird, 2017/10/22
- Re: How can I remove effects of text properties in 'before-string, Eli Zaretskii, 2017/10/22
- Re: How can I remove effects of text properties in 'before-string, Amos Bird, 2017/10/22
- Re: How can I remove effects of text properties in 'before-string, Eli Zaretskii, 2017/10/22
- Re: How can I remove effects of text properties in 'before-string, Amos Bird, 2017/10/22
- Re: How can I remove effects of text properties in 'before-string, Eli Zaretskii, 2017/10/22
Re: How can I remove effects of text properties in 'before-string,
Stefan Monnier <=
Re: How can I remove effects of text properties in 'before-string, Emanuel Berg, 2017/10/22