This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home. For a version of this page that may be more recent, see BuffersCowan in WG2's repo for R7RS-large.

Buffers­Cowan

cowan
2012-01-26 02:43:41
1history
source

Edit Buffers

This is a very preliminary description of edit buffers, basically mutable variable-length strings with some pointers into them. Temporarily, these functions are defined in terms of their Emacs Lisp equivalents, with the following exceptions:

Procedures

(buffer? obj) == (bufferp object)

(buffer-modified? buffer) == (buffer-modified-p)

(buffer-modified! buffer) == (restore-buffer-modified-p t)

(buffer-unmodified! buffer) == (set-buffer-modified-p nil)

(buffer-read-only? buffer) == buffer-read-only buffer local variable

(buffer-read-only! buffer) == (toggle-read-only t)

(buffer-read-write! buffer) == (toggle-read-only nil)

(make-buffer) == simple constructor, no name provided

(buffer-point buffer) == (point)

(buffer-length buffer) == (buffer-size buffer)

(buffer-set-point! buffer integer) == (goto-char integer)

(buffer-point-increment) == (forward-char integer)

(buffer-skip-chars-forward buffer string) == (skip-chars-forward string)

(buffer-skip-chars-backward buffer string) == (skip-chars-forward string)

(buffer-marker? obj) == (markerp obj)

(make-marker buffer marker-or-integer insertion-type) == (copy-marker marker-or-integer insertion-type)

(marker-position marker) == (marker-position marker)

(marker-buffer marker) == (marker-buffer marker)

(marker-insertion-type marker) == (marker-insertion-type marker)

(marker-set-position! marker position) = (set-marker marker position)

More to come....