summaryrefslogtreecommitdiff
path: root/lispref/buffers.texi
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1999-07-17 02:15:13 +0000
committerRichard M. Stallman <rms@gnu.org>1999-07-17 02:15:13 +0000
commitb6954afd99c5dedeb4d473c885b78e5453ab5e8c (patch)
tree543f2551670f1bd430f0f97affb04a1ed04d9fba /lispref/buffers.texi
parentb92b7c8da456badb0a699ac04296d549717bc29c (diff)
downloademacs-b6954afd99c5dedeb4d473c885b78e5453ab5e8c.tar.gz
*** empty log message ***
Diffstat (limited to 'lispref/buffers.texi')
-rw-r--r--lispref/buffers.texi24
1 files changed, 24 insertions, 0 deletions
diff --git a/lispref/buffers.texi b/lispref/buffers.texi
index f1227d60705..f05d242ef1a 100644
--- a/lispref/buffers.texi
+++ b/lispref/buffers.texi
@@ -29,6 +29,7 @@ not be displayed in any windows.
* Creating Buffers:: Functions that create buffers.
* Killing Buffers:: Buffers exist until explicitly killed.
* Indirect Buffers:: An indirect buffer shares text with some other buffer.
+* Buffer Gap:: The gap in the buffer.
@end menu
@node Buffer Basics
@@ -980,3 +981,26 @@ is not indirect, the value is @code{nil}. Otherwise, the value is
another buffer, which is never an indirect buffer.
@end defun
+@node Buffer Gap
+@section The Buffer Gap
+
+ Emacs buffers are implemented using an invisible @dfn{gap} to make
+insertion and deletion faster. Insertion works by filling in part of
+the gap, and deletion adds to the gap. Of course, this means that the
+gap must first be moved to the locus of the insertion or deletion.
+Emacs moves the gap only when you try to insert or delete. This is why
+your first editing command in one part of a large buffer, after
+previously editing in another far-away part, sometimes involves a
+noticeable delay.
+
+ This mechanism works invisibly, and Lisp code should never be affected
+by the gap's current location, but these functions are available for
+getting information about the gap status.
+
+@defun gap-position
+This function returns the current gap position in the current buffer.
+@end defun
+
+@defun gap-size
+This function returns the current gap size of the current buffer.
+@end defun