(lispref.info)Buffer Type


Next: Window Type Up: Editing Types

Buffer Type
-----------

   A "buffer" is an object that holds text that can be edited (*note
Buffers::.).  Most buffers hold the contents of a disk file (*note
Files::.) so they can be edited, but some are used for other purposes.
Most buffers are also meant to be seen by the user, and therefore
displayed, at some time, in a window (Note: Windows.).  But a buffer
need not be displayed in a window.

   The contents of a buffer are much like a string, but buffers are not
used like strings in Emacs Lisp, and the available operations are
different.  For example, text can be inserted into a buffer very
quickly, while "inserting" text into a string is accomplished by
concatenation and the result is an entirely new string object.

   Each buffer has a designated position called "point" (*note
Positions::.).  And one buffer is the "current buffer".  Most editing
commands act on the contents of the current buffer in the neighborhood
of point.  Many other functions manipulate or test the characters in
the current buffer and much of this manual is devoted to describing
these functions (Note: Text.).

   Several other data structures are associated with each buffer:

   * a local syntax table (Note: Syntax Tables.);

   * a local keymap (Note: Keymaps.); and,

   * a local variable binding list (Note: Buffer-Local Variables.).

The local keymap and variable list contain entries which individually
override global bindings or values.  These are used to customize the
behavior of programs in different buffers, without actually changing the
programs.

   Buffers have no read syntax.  They print in hash notation with the
buffer name.

     (current-buffer)
          => #<buffer objects.texi>


automatically generated by info2www