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

37.1 Buffer Basics

Buffers in SXEmacs editing are objects that have distinct names and hold text that can be edited. Buffers appear to Lisp programs as a special data type. You can think of the contents of a buffer as an extendible string; insertions and deletions may occur in any part of the buffer. See Text.

A Lisp buffer object contains numerous pieces of information. Some of this information is directly accessible to the programmer through variables, while other information is accessible only through special-purpose functions. For example, the visited file name is directly accessible through a variable, while the value of point is accessible only through a primitive function.

Buffer-specific information that is directly accessible is stored in buffer-local variable bindings, which are variable values that are effective only in a particular buffer. This feature allows each buffer to override the values of certain variables. Most major modes override variables such as fill-column or comment-column in this way. For more information about buffer-local variables and functions related to them, see Buffer-Local Variables.

For functions and variables related to visiting files in buffers, see Visiting Files and Saving Buffers. For functions and variables related to the display of buffers in windows, see Buffers and Windows.

Function: bufferp object

This function returns t if object is a buffer, nil otherwise.