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: Eli Zaretskii
Subject: Re: Inspecting behaviour of `make-overlay', is this expected?
Date: Sat, 24 Dec 2022 10:36:59 +0200

> 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.



reply via email to

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