The cl-gap-buffer Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-gap-buffer Reference Manual

This is the cl-gap-buffer Reference Manual, version 0.1, generated automatically by Declt version 2.3 "Robert April" on Tue Jan 09 13:37:08 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

#+TITLE: The =CL-GAP-BUFFER= Library
#+AUTHOR: Robert Smith
#+EMAIL: quad@symbo1ics.com

* Summary

A small library for efficient-local-insertion strings represented as
gap buffers. It operates efficiently for cursor-based editing.


* Usage

The principle use follows. Mutable operations' output is elided.

Create a gap buffer.

    : > (defparameter buf (make-gap-buffer))

Add some data to it.

    : > (gap-buffer-insert-string buf "hello")
    : > (gap-buffer-string buf)
    : "hello"
    : > (gap-buffer-insert-char buf #\a)
    : > (gap-buffer-string buf)
    : "helloa"

Move about in the gap buffer.

    : > (gap-buffer-move-left buf)
    : > (gap-buffer-move-left buf)
    : > (gap-buffer-insert-char buf #\y)
    : > (gap-buffer-string buf)
    : "hellyoa"

Remove characters.

    : > (gap-buffer-move-right buf)
    : > (gap-buffer-backspace buf)
    : > (gap-buffer-string buf)
    : "hellya"
    : > (gap-buffer-insert-char buf #\e)
    : > (gap-buffer-string buf)
    : "hellyea"
    : > (gap-buffer-delete buf)
    : > (gap-buffer-string buf)
    : "hellye"
    : > (gap-buffer-insert-char buf #\s)
    : > (gap-buffer-string buf)
    : "hellyes"


* Dependencies

None.


* License

See the file ~LICENSE~.

----------
### End of file


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-gap-buffer

Maintainer

Robert Smith

Author

Robert Smith

Description

Gap buffers in Common Lisp.

Long Description

An implementation of gap buffers in Common Lisp.

Version

0.1

Source

cl-gap-buffer.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 cl-gap-buffer.asd

Location

cl-gap-buffer.asd

Systems

cl-gap-buffer (system)

Packages

cl-gap-buffer-asd


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 cl-gap-buffer/package.lisp

Parent

cl-gap-buffer (system)

Location

package.lisp

Packages

cl-gap-buffer


Previous: , Up: Lisp files   [Contents][Index]

3.1.3 cl-gap-buffer/gap-buffer.lisp

Dependency

package.lisp (file)

Parent

cl-gap-buffer (system)

Location

gap-buffer.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 cl-gap-buffer-asd

Source

cl-gap-buffer.asd

Use List

Previous: , Up: Packages   [Contents][Index]

4.2 cl-gap-buffer

Gap buffer API.

Source

package.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Special variables

Special Variable: *gap-buffer-growth*

Positive integer specifying how much the buffer should grow if the gap closes.

Package

cl-gap-buffer

Source

gap-buffer.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: gap-buffer-backspace BUF

Backward-delete a character in the gap buffer BUF.

Package

cl-gap-buffer

Source

gap-buffer.lisp (file)

Function: gap-buffer-clear BUF

Clear the contents of the gap buffer BUF.

Package

cl-gap-buffer

Source

gap-buffer.lisp (file)

Function: gap-buffer-components BUF

Return the string before the gap and after the gap in the gap buffer BUF.

Package

cl-gap-buffer

Source

gap-buffer.lisp (file)

Function: gap-buffer-delete BUF

Forward-delete a character in the gap buffer BUF.

Package

cl-gap-buffer

Source

gap-buffer.lisp (file)

Function: gap-buffer-insert-char BUF CHAR

Insert a character CHAR into a gap buffer BUF at the gap, resizing if needed.

Package

cl-gap-buffer

Source

gap-buffer.lisp (file)

Function: gap-buffer-insert-string BUF STRING

Insert a string STRING into the gap buffer BUF.

Package

cl-gap-buffer

Source

gap-buffer.lisp (file)

Function: gap-buffer-length BUF

Find the length of the gap buffer BUF. Analogous to LENGTH.

Package

cl-gap-buffer

Source

gap-buffer.lisp (file)

Function: gap-buffer-move-left BUF

Move the gap left in the gap buffer BUF.

Package

cl-gap-buffer

Source

gap-buffer.lisp (file)

Function: gap-buffer-move-right BUF

Move the gap to the right in the gap buffer BUF.

Package

cl-gap-buffer

Source

gap-buffer.lisp (file)

Function: gap-buffer-p OBJECT
Package

cl-gap-buffer

Source

gap-buffer.lisp (file)

Function: gap-buffer-string BUF

Format a gap buffer BUF into a string.

Package

cl-gap-buffer

Source

gap-buffer.lisp (file)

Function: make-gap-buffer &optional LENGTH

Make a new gap buffer of size LENGTH.

Package

cl-gap-buffer

Source

gap-buffer.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Structures

Structure: gap-buffer ()
Package

cl-gap-buffer

Source

gap-buffer.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

print-object (method)

Direct slots
Slot: data
Readers

buf.data (function)

Writers

(setf buf.data) (function)

Slot: gap-start
Readers

buf.gap-start (function)

Writers

(setf buf.gap-start) (function)

Slot: gap-end
Readers

buf.gap-end (function)

Writers

(setf buf.gap-end) (function)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Functions

Function: buf.data INSTANCE
Function: (setf buf.data) VALUE INSTANCE
Package

cl-gap-buffer

Source

gap-buffer.lisp (file)

Function: buf.gap-end INSTANCE
Function: (setf buf.gap-end) VALUE INSTANCE
Package

cl-gap-buffer

Source

gap-buffer.lisp (file)

Function: buf.gap-start INSTANCE
Function: (setf buf.gap-start) VALUE INSTANCE
Package

cl-gap-buffer

Source

gap-buffer.lisp (file)

Function: copy-gap-buffer INSTANCE
Package

cl-gap-buffer

Source

gap-buffer.lisp (file)

Function: gap-buffer-gap-length BUF
Package

cl-gap-buffer

Source

gap-buffer.lisp (file)

Function: gap-buffer-print-function BUF STREAM DEPTH
Package

cl-gap-buffer

Source

gap-buffer.lisp (file)

Function: make-raw-gap-buffer &key (DATA DATA) (GAP-START GAP-START) (GAP-END GAP-END)
Package

cl-gap-buffer

Source

gap-buffer.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
cl-gap-buffer.asd: The cl-gap-buffer<dot>asd file
cl-gap-buffer/gap-buffer.lisp: The cl-gap-buffer/gap-buffer<dot>lisp file
cl-gap-buffer/package.lisp: The cl-gap-buffer/package<dot>lisp file

F
File, Lisp, cl-gap-buffer.asd: The cl-gap-buffer<dot>asd file
File, Lisp, cl-gap-buffer/gap-buffer.lisp: The cl-gap-buffer/gap-buffer<dot>lisp file
File, Lisp, cl-gap-buffer/package.lisp: The cl-gap-buffer/package<dot>lisp file

L
Lisp File, cl-gap-buffer.asd: The cl-gap-buffer<dot>asd file
Lisp File, cl-gap-buffer/gap-buffer.lisp: The cl-gap-buffer/gap-buffer<dot>lisp file
Lisp File, cl-gap-buffer/package.lisp: The cl-gap-buffer/package<dot>lisp file

Jump to:   C   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
B   C   F   G   M  
Index Entry  Section

(
(setf buf.data): Internal functions
(setf buf.gap-end): Internal functions
(setf buf.gap-start): Internal functions

B
buf.data: Internal functions
buf.gap-end: Internal functions
buf.gap-start: Internal functions

C
copy-gap-buffer: Internal functions

F
Function, (setf buf.data): Internal functions
Function, (setf buf.gap-end): Internal functions
Function, (setf buf.gap-start): Internal functions
Function, buf.data: Internal functions
Function, buf.gap-end: Internal functions
Function, buf.gap-start: Internal functions
Function, copy-gap-buffer: Internal functions
Function, gap-buffer-backspace: Exported functions
Function, gap-buffer-clear: Exported functions
Function, gap-buffer-components: Exported functions
Function, gap-buffer-delete: Exported functions
Function, gap-buffer-gap-length: Internal functions
Function, gap-buffer-insert-char: Exported functions
Function, gap-buffer-insert-string: Exported functions
Function, gap-buffer-length: Exported functions
Function, gap-buffer-move-left: Exported functions
Function, gap-buffer-move-right: Exported functions
Function, gap-buffer-p: Exported functions
Function, gap-buffer-print-function: Internal functions
Function, gap-buffer-string: Exported functions
Function, make-gap-buffer: Exported functions
Function, make-raw-gap-buffer: Internal functions

G
gap-buffer-backspace: Exported functions
gap-buffer-clear: Exported functions
gap-buffer-components: Exported functions
gap-buffer-delete: Exported functions
gap-buffer-gap-length: Internal functions
gap-buffer-insert-char: Exported functions
gap-buffer-insert-string: Exported functions
gap-buffer-length: Exported functions
gap-buffer-move-left: Exported functions
gap-buffer-move-right: Exported functions
gap-buffer-p: Exported functions
gap-buffer-print-function: Internal functions
gap-buffer-string: Exported functions

M
make-gap-buffer: Exported functions
make-raw-gap-buffer: Internal functions

Jump to:   (  
B   C   F   G   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
D   G   S  
Index Entry  Section

*
*gap-buffer-growth*: Exported special variables

D
data: Exported structures

G
gap-end: Exported structures
gap-start: Exported structures

S
Slot, data: Exported structures
Slot, gap-end: Exported structures
Slot, gap-start: Exported structures
Special Variable, *gap-buffer-growth*: Exported special variables

Jump to:   *  
D   G   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   G   P   S  
Index Entry  Section

C
cl-gap-buffer: The cl-gap-buffer system
cl-gap-buffer: The cl-gap-buffer package
cl-gap-buffer-asd: The cl-gap-buffer-asd package

G
gap-buffer: Exported structures

P
Package, cl-gap-buffer: The cl-gap-buffer package
Package, cl-gap-buffer-asd: The cl-gap-buffer-asd package

S
Structure, gap-buffer: Exported structures
System, cl-gap-buffer: The cl-gap-buffer system

Jump to:   C   G   P   S