help-gnu-emacs
[Top][All Lists]
Advanced

[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 <address@hidden>
> Cc: address@hidden
> 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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]