-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathchapter-buffer-representation.texi
39 lines (33 loc) · 1.65 KB
/
chapter-buffer-representation.texi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@node Representation of the Editor Buffer
@chapter Representation of the Editor Buffer
@sysname{} uses the @clufferlink{} library to represent its buffers. We
briefly describe the essential aspects of that library below. For
detailed information on how it works, see the dedicated documentation.
@cluffer{} proposes two distinct protocols, namely the @emph{edit
protocol} and the @emph{update protocol}.
@itemize
@item
@cindex edit protocol
@anchor{term-edit-protocol}
The @dfn{edit protocol} provides operations for editing the buffer
contents. It has been designed to be both simple and very efficient.
As such, it does not provide operations on larger chunks of contents
such as @emph{regions}. It provides operations only on single items,
and operations to split and join lines. These editing operations do
not trigger any view updates which is why they can be invoked a large
number of times for each user interaction without loss of performance.
This feature is taken advantage of in operations on regions and in
keyboard macros.
@item
@cindex update protocol
@anchor{term-update-protocol}
The @dfn{update protocol} is designed to be run at the frequency of the
event loop. It is based on the concept of @emph{time stamps}. Any
number of edit operations can be performed between two invocations of
the update protocol, and the update protocol can be invoked at
different times for different views, including very rarely for views
that are not currently on display. Given that the amount of data
displayed in a view is relatively modest, no attempt is made to
minimize the modifications to the view. The smallest unit of an
update is a @emph{line} of items.
@end itemize