diff lispref/buffers.texi @ 24951:7451b1458af1

*** empty log message ***
author Richard M. Stallman <rms@gnu.org>
date Sat, 17 Jul 1999 02:15:13 +0000
parents 40089afa2b1d
children 467b88fab665
line wrap: on
line diff
--- a/lispref/buffers.texi	Sat Jul 17 00:49:00 1999 +0000
+++ b/lispref/buffers.texi	Sat Jul 17 02:15:13 1999 +0000
@@ -29,6 +29,7 @@
 * 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 @@
 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