Go to the first, previous, next, last section, table of contents.
All buffer objects store a set of basic attributes, some of these
are:
- name
-
Each buffer has a unique name.
- Function: buffer-name &optional buffer
-
Returns the name of the buffer buffer, or of the current buffer if
buffer is undefined.
(buffer-name)
=> "programmer.texi"
- Function: set-buffer-name name &optional buffer
-
Sets the name of the buffer buffer (or the current buffer) to
the string name.
Note that name is not checked for uniqueness, use the
make-buffer-name function if you want a guaranteed unique name.
- Function: make-buffer-name name
-
Returns a unique version of the string name so that no existing
buffer has the same string as its name. If a clash occurs a suffix
`<N>' is appended to name, where n is the first
number which guarantees the uniqueness of the result.
- Function: get-buffer name
-
Returns the existing buffer whose name is name, or
nil if
no such buffer exists.
- file name
-
Since buffers often contain text belonging to files on disk the buffer
stores the name of the file its text was read from. See section Editing Files.
- Function: buffer-file-name &optional buffer
-
Returns the name of the file stored in buffer. If no file is stored
in the buffer the null string (`') is returned.
(buffer-file-name)
=> "man/programmer.texi"
- Function: set-buffer-file-name name &optional buffer
-
This function sets the file-name of the buffer to the string name.
- Function: get-file-buffer file-name
-
Searches for an existing buffer containing the file file-name then
returns it, or
nil if no such buffer exists.
- contents
-
The contents of a buffer is the text it holds. This is stored as an array
of lines. See section Text.
- tab size
-
This is the spacing of tab stops. When the contents of the buffer is being
displayed (in a window) this value is used.
- Variable: tab-size
-
A buffer-local variable which holds the size of tab stops in the buffer.
- glyph table
-
Each buffer has its own glyph table which is used when the buffer is
being displayed. See section Buffer Glyph Tables.
- local variables
-
Each buffer can have its own value for any variable, these local values
are stored in an alist which lives in the buffer object.
See section Buffer-Local Variables.
- Function: buffer-variables &optional buffer
-
Returns the alist of local variables in the buffer. Each alist element
is structured like,
(symbol . local-value).
- modification counter
-
Each modification made to the buffer increments its modification counter.
See section Modifications to Buffers.
- Function: buffer-changes &optional buffer
-
Returns the number of modifications made to the buffer since it was
created.
- undo information
-
When a modification is made to a buffer enough information is recorded
so that the modification can later be undone. See section Controlling Undo.
All other buffer-specific information is kept in buffer-local variables.
Go to the first, previous, next, last section, table of contents.