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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inspecting behaviour of `make-overlay', is this expected?


From: Jean Louis
Subject: Re: Inspecting behaviour of `make-overlay', is this expected?
Date: Sat, 24 Dec 2022 19:32:09 +0300
User-agent: Mutt/2.2.9+54 (af2080d) (2022-11-21)

x* Eli Zaretskii <eliz@gnu.org> [2022-12-24 11:40]:
> > Date: Sat, 24 Dec 2022 10:52:47 +0300
> > From: Jean Louis <bugs@gnu.support>
> > 
> > XXXXXXXXXX
> > ^
> > | position 0 in buffer
> > 
> > (setq my-overlay (make-overlay 0 10))
> > (get-buffer-window (overlay-buffer my-overlay))
> > (overlay-put my-overlay 'display "Hello") then I get:
> > 
> > HelloX 
> > 
> > instead of "Hello"
> > 
> > Is this normal behavior?
> 
> Yes.  The 10 part says that the overlay _ends_ before position 10.
> This is standard Emacs behavior with text properties and overlays: END
> means the first character NOT affected by the property/overlay.

Good to know.

--
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

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