[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : Inspecting behaviour of `make-overlay', is this expecte
From: |
Drew Adams |
Subject: |
RE: [External] : Inspecting behaviour of `make-overlay', is this expected? |
Date: |
Sat, 24 Dec 2022 16:39:55 +0000 |
> > XXXXXXXXXX
> > ^
> > | position 0 in buffer
>
> Position 1. Buffer positions start with 1.
>
> Try (make-overlay 1 11).
You _can_ pass 0 to `make-overlay', but it
creates the overlay starting at position 1.
E.g. (make-overlay 0 10) creates an overlay
from the first position, 1, through the 9th
(as Eli mentioned).
As (elisp) `Managing Overlays' tells you:
Function: make-overlay start end &optional buffer front-advance
rear-advance
This function creates and returns an overlay that belongs to BUFFER
and ranges from START to END. Both START and END must specify
buffer positions; they may be integers or markers
You can use `overlay-start' and `overlay-end'
to see the limits of your overlay.