[Top][All Lists]

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

RE: Bug #25608 and the comment-cache branch

From: Drew Adams
Subject: RE: Bug #25608 and the comment-cache branch
Date: Mon, 13 Feb 2017 08:14:21 -0800 (PST)

> > Similarly, it would be a lot more convenient for syntax-ppss to consult
> > some dynamically-scoped variable to find the "beginning of (sub)buffer",
> > rather than having to scan text properties.
> >
> Every island may has two varibles like island-begin-marker and
> island-end-marker in island-variables. Then we don't need to scan text
> property. Just use the two markers to identify the region of the island.

FWIW: This is exactly what I do in `zones.el'.  You can have any
number of such "island" (or zones) variables.  Each is a list of
such marker pairs.

Actually, each pair can have form (ID POSITION1 POSITION2 . EXTRA),
where ID is a natural-number zone identifier, the POSITIONS are
natural numbers, markers for the same buffer, or "readable markers"
for the same buffer.  EXTRA is a list of anything (typically nil).

A "readable marker" is a list (marker BUFFER POSITION), where
BUFFER is a buffer name (string) and POSITION is a buffer position
(number only).  Readable markers let you save zones persistently
(e.g., as bookmarks) and restore them.


reply via email to

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