Next: , Previous: , Up: Buffer Names and File Names   [Index]


7.4.5.4 other-buffer

Function: other-buffer &optional buffer visible-ok frame

Return most recently select buffer other than BUFFER. This is done by scanning the selected or specified frame’s buffer list first, followed by the list of all buffers.

BUFFER

Return a buffer other than this one if possible; ignore this buffer completely unless it is a live buffer.

VISIBLE-OK

Buffers not visible in windows are preferred to visible buffers, unless optional second argument VISIBLE-OK is non-nil.

FRAME

if non-nil, and is a live frame, use that frame’s buffer list, not the selected frame’s buffer list.

RETURN VALUE

return a found buffer; if no other buffer exists, return the ‘*scratch*’ buffer, and create it if necessary.