diff options
| author | Eli Zaretskii | 2022-12-14 20:13:47 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2022-12-14 20:13:47 +0200 |
| commit | f93a5180a61070c14906a86d5665c615bdbc652a (patch) | |
| tree | 96c7edc0363bee410877ee6b5f853d4660e23db7 /src/buffer.c | |
| parent | d51b66ed5407c63b5a07c5ca26d233678b709ad6 (diff) | |
| download | emacs-f93a5180a61070c14906a86d5665c615bdbc652a.tar.gz emacs-f93a5180a61070c14906a86d5665c615bdbc652a.zip | |
Update the documentation of overlays (bug#59996)
* src/buffer.c (Foverlay_recenter, Foverlay_lists): Update the doc
strings.
* lisp/subr.el (copy-overlay): Update comment.
* doc/lispref/internals.texi (Buffer Internals): Remove buffer
fields relevant to the old implementation; add the new interval
tree field.
* doc/lispref/display.texi (Overlays, Managing Overlays): Update
text to be consistent with the new implementation of overlays.
(Managing Overlays): Remove documentation of 'overlay-recenter'.
* etc/NEWS: Mention incompatible aspects of overlay
reimplementation.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/buffer.c b/src/buffer.c index 69f27c9f476..9a30faa0e1a 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -3898,11 +3898,11 @@ the value is (point-min). */) | |||
| 3898 | /* These functions are for debugging overlays. */ | 3898 | /* These functions are for debugging overlays. */ |
| 3899 | 3899 | ||
| 3900 | DEFUN ("overlay-lists", Foverlay_lists, Soverlay_lists, 0, 0, 0, | 3900 | DEFUN ("overlay-lists", Foverlay_lists, Soverlay_lists, 0, 0, 0, |
| 3901 | doc: /* Return a pair of lists giving all the overlays of the current buffer. | 3901 | doc: /* Return a list giving all the overlays of the current buffer. |
| 3902 | The car has all the overlays before the overlay center; | 3902 | |
| 3903 | the cdr has all the overlays after the overlay center. | 3903 | For backward compatibility, the value is actually a list that |
| 3904 | Recentering overlays moves overlays between these lists. | 3904 | holds another list; the overlays are in the inner list. |
| 3905 | The lists you get are copies, so that changing them has no effect. | 3905 | The list you get is a copy, so that changing it has no effect. |
| 3906 | However, the overlays you get are the real objects that the buffer uses. */) | 3906 | However, the overlays you get are the real objects that the buffer uses. */) |
| 3907 | (void) | 3907 | (void) |
| 3908 | { | 3908 | { |
| @@ -3918,7 +3918,12 @@ However, the overlays you get are the real objects that the buffer uses. */) | |||
| 3918 | DEFUN ("overlay-recenter", Foverlay_recenter, Soverlay_recenter, 1, 1, 0, | 3918 | DEFUN ("overlay-recenter", Foverlay_recenter, Soverlay_recenter, 1, 1, 0, |
| 3919 | doc: /* Recenter the overlays of the current buffer around position POS. | 3919 | doc: /* Recenter the overlays of the current buffer around position POS. |
| 3920 | That makes overlay lookup faster for positions near POS (but perhaps slower | 3920 | That makes overlay lookup faster for positions near POS (but perhaps slower |
| 3921 | for positions far away from POS). */) | 3921 | for positions far away from POS). |
| 3922 | |||
| 3923 | Since Emacs 29.1, this function is a no-op, because the implementation | ||
| 3924 | of overlays changed and their lookup is now fast regardless of their | ||
| 3925 | position in the buffer. In particular, this function no longer affects | ||
| 3926 | the value returned by `overlay-lists'. */) | ||
| 3922 | (Lisp_Object pos) | 3927 | (Lisp_Object pos) |
| 3923 | { | 3928 | { |
| 3924 | CHECK_FIXNUM_COERCE_MARKER (pos); | 3929 | CHECK_FIXNUM_COERCE_MARKER (pos); |