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: Drew Adams
Subject: RE: How can I remove effects of text properties in 'before-string
Date: Sun, 22 Oct 2017 10:32:20 -0700 (PDT)

> > Is this behavior documented?  I couldn't find anything
> > about it, but it might well be there somewhere.  I looked
> > in the doc about overlays and the doc about the margin,
> > but perhaps it is there and I overlooked or misread it.
> 
> It's indirectly documented in "Displaying Faces".

OK.  The margin-spec `display' property is applied in
this case to a zero-length buffer zone.  And a margin-spec
`display' property is of type "replacing", so the text
in that zone is not shown (which has no effect, since
the zone is empty).

What you say makes sense: face `hl-line-face' is used
for an overlay that covers the empty zone in question,
so that face is active there, so it is visible for the
margin-spec `display' overlay.

Still, I don't think this behavior is obvious, from
the doc.  I'm not sure where it should be pointed out,
but I think it would help to do so, even if it does
follow from what is written now.

Perhaps point this out explicitly in node `Displaying
Faces'.  And perhaps xref that node from node `Display
Margins', since a margin spec is a likely gotcha candidate).

> Not a bug: the code does this on purpose, and even has comments that
> explicitly describe this.  Emacs worked like that since v21.1.

Code comments are one way to make the design and behavior
clear.  The Elisp manual is another way - a better way to
get across something like this to most users.

Thank you for the explanation.  Please consider improving
the doc to make this behavior clearer.



reply via email to

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