From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/elisp/buffer-gap.html | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 devdocs/elisp/buffer-gap.html (limited to 'devdocs/elisp/buffer-gap.html') diff --git a/devdocs/elisp/buffer-gap.html b/devdocs/elisp/buffer-gap.html new file mode 100644 index 00000000..627d5be0 --- /dev/null +++ b/devdocs/elisp/buffer-gap.html @@ -0,0 +1,10 @@ +

The Buffer Gap

Emacs buffers are implemented using an invisible 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.

Function: gap-position +

This function returns the current gap position in the current buffer.

+
Function: gap-size +

This function returns the current gap size of the current buffer.

+
+

+ Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
+ https://www.gnu.org/software/emacs/manual/html_node/elisp/Buffer-Gap.html +

+
-- cgit v1.2.3