[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: |
Eli Zaretskii |
Subject: |
Re: How can I remove effects of text properties in 'before-string |
Date: |
Sun, 22 Oct 2017 22:34:39 +0300 |
> From: Amos Bird <amosbird@gmail.com>
> Cc: help-gnu-emacs@gnu.org
> Date: Mon, 23 Oct 2017 03:12:55 +0800
>
> (set-window-margins (get-buffer-window) 20 0)
> (setq ovstring (propertize "Hi, there!" 'face '((t (:foreground
> "magenta" :weight bold :inherit default)))))
> (overlay-put (make-overlay (point) (point)) 'before-string
> (propertize "." 'display `((margin left-margin) ,ovstring)))
> (hl-line-mode)
>
> The margin text doesn't appear to have the "magenta" color.
":inherit default" should appear before the other attributes.
Think about it: you are telling Emacs how to merge the default face
with other attributes, so it should start with the default face,
right?
Re: How can I remove effects of text properties in 'before-string, Emanuel Berg, 2017/10/22