Go to the first, previous, next, last section, table of contents.


The Buffer List

Each window (see section Windows) has a list of buffers which may be displayed in that window. It is arranged is most-recently-used order, so that the car of the list is the buffer currently being shown in the window, the second element the window previously being shown and so on.

Variable: buffer-list
A variable, local to each window, which contains a list of the buffers available in the window. The list is maintained in most-recently-used order.

buffer-list
    => (#<buffer programmer.texi> #<buffer *Help*>
               #<buffer buffers.c> #<buffer buffers.jl>
               #<buffer edit.c> #<buffer edit.h>
               #<buffer *jade*> #<buffer lisp.jl>
               #<buffer *compilation*> #<buffer *Info*>)

Generally each window's buffer-list contains the same buffers, each window has its own value for the variable so it can be kept in the correct order (each window will probably be displaying different buffers).

Function: add-buffer buffer
This function ensures that the buffer buffer is in each window's buffer-list. If it isn't it is appended to the end of the list.

Function: remove-buffer buffer
Deletes all references to buffer in each window's buffer-list.

Command: bury-buffer &optional buffer all-windows
Puts buffer (or the currently displayed buffer) at the end of the current window's buffer-list then switch to the buffer at the head of the list.

If all-windows is non-nil this is done in all windows (the same buffer will be buried in each window though).

Command: rotate-buffers-forward
Moves the buffer at the head of the buffer-list to be last in the list, the new head of the buffer-list is displayed in the current window.


Go to the first, previous, next, last section, table of contents.