diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-08-13 21:25:03 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-08-13 21:25:03 +0000 |
commit | 9ba7f85cde4c9f932ac714f465f119658f1f9d27 (patch) | |
tree | 9cf6ab8997474c69818abb23f107a59496571524 /lispref | |
parent | e47067d2a192b966adc773392f348a0f78b9f08f (diff) | |
download | emacs-9ba7f85cde4c9f932ac714f465f119658f1f9d27.tar.gz |
Show how to reorder buffers.emacs-19.34
Diffstat (limited to 'lispref')
-rw-r--r-- | lispref/buffers.texi | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/lispref/buffers.texi b/lispref/buffers.texi index a01d7e56922..de2d43052d9 100644 --- a/lispref/buffers.texi +++ b/lispref/buffers.texi @@ -646,11 +646,24 @@ begin with a space. The elements are actual buffers, not their names. "buffer.c" "*Help*" "TAGS") @end group @end example - -This list is a copy of a list used inside Emacs; modifying it has no -effect on the ordering of buffers. @end defun + The list that @code{buffer-list} returns is constructed specifically +by @code{buffer-list}; it is not an internal Emacs data structure, and +modifying it has no effect on the order of buffers. If you want to +change the order of buffers in the list, here is an easy way: + +@example +(defun reorder-buffer-list (new-list) + (while new-list + (bury-buffer (car new-list)) + (setq new-list (cdr new-list)))) +@end example + + With this method, you can specify any order for the list, but there is +no danger of losing a buffer or adding something that is not a valid +live buffer. + @defun other-buffer &optional buffer visible-ok This function returns the first buffer in the buffer list other than @var{buffer}. Usually this is the buffer most recently shown in |