aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-08-13 21:25:03 +0000
committerRichard M. Stallman1996-08-13 21:25:03 +0000
commit9ba7f85cde4c9f932ac714f465f119658f1f9d27 (patch)
tree9cf6ab8997474c69818abb23f107a59496571524
parente47067d2a192b966adc773392f348a0f78b9f08f (diff)
downloademacs-9ba7f85cde4c9f932ac714f465f119658f1f9d27.tar.gz
emacs-9ba7f85cde4c9f932ac714f465f119658f1f9d27.zip
Show how to reorder buffers.emacs-19.34
-rw-r--r--lispref/buffers.texi19
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.
646 "buffer.c" "*Help*" "TAGS") 646 "buffer.c" "*Help*" "TAGS")
647@end group 647@end group
648@end example 648@end example
649
650This list is a copy of a list used inside Emacs; modifying it has no
651effect on the ordering of buffers.
652@end defun 649@end defun
653 650
651 The list that @code{buffer-list} returns is constructed specifically
652by @code{buffer-list}; it is not an internal Emacs data structure, and
653modifying it has no effect on the order of buffers. If you want to
654change 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
664no danger of losing a buffer or adding something that is not a valid
665live buffer.
666
654@defun other-buffer &optional buffer visible-ok 667@defun other-buffer &optional buffer visible-ok
655This function returns the first buffer in the buffer list other than 668This 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