changeset 1586:f84e400808d0

* buffer.c (Ferase_buffer): Doc fix. * buffer.c (Fbury_buffer): Make this behave as in 18.59, although that behavior is very odd - only remove the buffer from the selected window if BUFFER was nil or omitted.
author Jim Blandy <jimb@redhat.com>
date Mon, 16 Nov 1992 00:33:17 +0000
parents 447d89e51c6e
children 57ae5625fe22
files src/buffer.c
diffstat 1 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/buffer.c	Mon Nov 16 00:32:56 1992 +0000
+++ b/src/buffer.c	Mon Nov 16 00:33:17 1992 +0000
@@ -927,14 +927,20 @@
   "Put BUFFER at the end of the list of all buffers.\n\
 There it is the least likely candidate for `other-buffer' to return;\n\
 thus, the least likely buffer for \\[switch-to-buffer] to select by default.\n\
-BUFFER is also removed from the selected window if it was displayed there.\n\
-If BUFFER is omitted, the current buffer is buried.")
+If BUFFER is nil or omitted, bury the current buffer.\n\
+Also, if BUFFER is nil or omitted, remove the current buffer from the\n\
+selected window if it is displayed there.")
   (buf)
      register Lisp_Object buf;
 {
   /* Figure out what buffer we're going to bury.  */
   if (NILP (buf))
-    XSET (buf, Lisp_Buffer, current_buffer);
+    {
+      XSET (buf, Lisp_Buffer, current_buffer);
+
+      /* If we're burying the current buffer, unshow it.  */
+      Fswitch_to_buffer (Fother_buffer (buf), Qnil);
+    }
   else
     {
       Lisp_Object buf1;
@@ -945,11 +951,7 @@
       buf = buf1;
     }
 
-  /* Remove it from the screen.  */
-  if (EQ (buf, XWINDOW (selected_window)->buffer))
-    Fswitch_to_buffer (Fother_buffer (buf, Qnil), Qnil);
-
-  /* Move it to the end of the buffer list.  */
+  /* Move buf to the end of the buffer list.  */
   {
     register Lisp_Object aelt, link;
 
@@ -965,7 +967,7 @@
 
 DEFUN ("erase-buffer", Ferase_buffer, Serase_buffer, 0, 0, 0,
   "Delete the entire contents of the current buffer.\n\
-Any clipping restriction in effect (see `narrow-to-buffer') is removed,\n\
+Any clipping restriction in effect (see `narrow-to-region') is removed,\n\
 so the buffer is truly empty after this.")
   ()
 {