aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorJim Blandy <[email protected]>1992-11-16 00:33:17 +0000
committerJim Blandy <[email protected]>1992-11-16 00:33:17 +0000
commita56118855c36c3b772a320137e1efd1e6e760a48 (patch)
tree349923c60fbb3c202bf70e44c78c82422c438766 /src/buffer.c
parent82d3f7435fe0960336eb52a66ebab775d411bfe0 (diff)
* 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.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 74a9ad78dd..3a31819072 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -927,14 +927,20 @@ DEFUN ("bury-buffer", Fbury_buffer, Sbury_buffer, 0, 1, "",
"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 @@ If BUFFER is omitted, the current buffer is buried.")
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 @@ If BUFFER is omitted, the current buffer is buried.")
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.")
()
{