# HG changeset patch # User Jim Blandy # Date 721873997 0 # Node ID f84e400808d0434455f57228e2c090cf0f0e71dc # Parent 447d89e51c6e788c547852f351968844ccf2114f * 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. diff -r 447d89e51c6e -r f84e400808d0 src/buffer.c --- 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.") () {