Mercurial > emacs
changeset 73780:b84950e6ade6
(Managing Overlays): Document overlay-recenter.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 06 Nov 2006 16:08:35 +0000 |
parents | ab4757475733 |
children | 6b7048d2eb41 |
files | lispref/display.texi |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lispref/display.texi Mon Nov 06 16:06:11 2006 +0000 +++ b/lispref/display.texi Mon Nov 06 16:08:35 2006 +0000 @@ -1259,6 +1259,21 @@ @result{} t @end example + Emacs stores the overlays of each buffer in two lists, divided +around an arbitrary ``center position.'' One list extends backwards +through the buffer from that center position, and the other extends +forwards from that center position. The center position can be anywhere +in the buffer. + +@defun overlay-recenter pos +This function recenters the overlays of the current buffer around +position @var{pos}. That makes overlay lookup faster for positions +near @var{pos}, but slower for positions far away from @var{pos}. +@end defun + + A loop that scans the buffer forwards, creating overlays, can run +faster if you do @code{(overlay-recenter (point-max))} first. + @node Overlay Properties @subsection Overlay Properties