Mercurial > emacs
comparison lispref/buffers.texi @ 15862:d0a061b594a1 EMACS_19_34
Show how to reorder buffers.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 13 Aug 1996 21:25:03 +0000 |
parents | 750f4d22537f |
children | 66d807bdc5b4 |
comparison
equal
deleted
inserted
replaced
15861:4bc8e9119883 | 15862:d0a061b594a1 |
---|---|
644 (mapcar (function buffer-name) (buffer-list)) | 644 (mapcar (function buffer-name) (buffer-list)) |
645 @result{} ("buffers.texi" " *Minibuf-1*" | 645 @result{} ("buffers.texi" " *Minibuf-1*" |
646 "buffer.c" "*Help*" "TAGS") | 646 "buffer.c" "*Help*" "TAGS") |
647 @end group | 647 @end group |
648 @end example | 648 @end example |
649 | 649 @end defun |
650 This list is a copy of a list used inside Emacs; modifying it has no | 650 |
651 effect on the ordering of buffers. | 651 The list that @code{buffer-list} returns is constructed specifically |
652 @end defun | 652 by @code{buffer-list}; it is not an internal Emacs data structure, and |
653 modifying it has no effect on the order of buffers. If you want to | |
654 change the order of buffers in the list, here is an easy way: | |
655 | |
656 @example | |
657 (defun reorder-buffer-list (new-list) | |
658 (while new-list | |
659 (bury-buffer (car new-list)) | |
660 (setq new-list (cdr new-list)))) | |
661 @end example | |
662 | |
663 With this method, you can specify any order for the list, but there is | |
664 no danger of losing a buffer or adding something that is not a valid | |
665 live buffer. | |
653 | 666 |
654 @defun other-buffer &optional buffer visible-ok | 667 @defun other-buffer &optional buffer visible-ok |
655 This function returns the first buffer in the buffer list other than | 668 This function returns the first buffer in the buffer list other than |
656 @var{buffer}. Usually this is the buffer most recently shown in | 669 @var{buffer}. Usually this is the buffer most recently shown in |
657 the selected window, aside from @var{buffer}. Buffers whose | 670 the selected window, aside from @var{buffer}. Buffers whose |