From acab783e7ff99fefdc0d5ecd341a41ef969d13a4 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 20 Mar 2008 17:21:16 +0000 Subject: [PATCH] (Fcall_interactively) [case 'B']: Use other-buffer as default. --- src/ChangeLog | 5 +++++ src/callint.c | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b436cb7e998..59904d09159 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-03-20 Andreas Schwab + + * callint.c (Fcall_interactively) [case 'B']: Use other-buffer + as default. + 2008-03-19 Jason Rumney * w32fns.c (hourglass_timer, hourglass_hwnd): New variables. diff --git a/src/callint.c b/src/callint.c index 76d234e8678..2f98d263410 100644 --- a/src/callint.c +++ b/src/callint.c @@ -516,20 +516,20 @@ invoke it. If KEYS is omitted or nil, the return value of case 'B': /* Name of buffer, possibly nonexistent */ { Lisp_Object tema, temb, temc; - int skip_current = 1; - if (*tem == 'b' && !EQ (selected_window, minibuf_window)) - skip_current = 0; - - /* Get a list of buffer names (except the current buffer and - internal buffers), and use this list for default values. */ + /* Get a list of buffer names (except internal buffers), and + use this list for default values. Put either current + buffer or other-buffer in front. */ tema = Qnil; temc = Fcurrent_buffer (); + if (*tem == 'B' || EQ (selected_window, minibuf_window)) + temc = Fother_buffer (temc, Qnil, Qnil); + tema = Fcons (XBUFFER (temc)->name, tema); teml = Fbuffer_list (selected_frame); for (; CONSP (teml); teml = XCDR (teml)) { temb = XCAR (teml); - if (skip_current && EQ (temb, temc)) + if (EQ (temb, temc)) continue; if (NILP (temb)) continue; -- 2.39.5