From: Stefan Monnier Date: Wed, 12 Mar 2008 18:13:23 +0000 (+0000) Subject: (Fswitch_to_buffer): Fall back on pop-to-buffer. X-Git-Tag: emacs-pretest-23.0.90~7260 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1c55ebd109fad7b6e3f9c61b6c666fd4fa6e381a;p=emacs.git (Fswitch_to_buffer): Fall back on pop-to-buffer. --- diff --git a/etc/NEWS b/etc/NEWS index 82256087915..c96a8ad3686 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -65,6 +65,10 @@ default toolkit, but you can use --with-x-toolkit=gtk if necessary. * Changes in Emacs 23.1 +** Operations like C-x b and C-x C-f which use switch-to-buffer do not fail +any more when used in a minibuffer or a dedicated window. Instead, they +fallback on using pop-to-buffer which will use some other window. + ** Emacs now supports using both X displays and ttys in one session. Start the server (M-x server-start). Then `emacsclient -t' creates a tty frame connected to the running emacs server. You can also use any diff --git a/src/ChangeLog b/src/ChangeLog index 5a5e9ef48fd..72724275fbf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2008-03-12 Stefan Monnier + + * buffer.c (Fswitch_to_buffer): Fall back on pop-to-buffer. + 2008-03-11 Jan Dj$(Q)Z(Brv * xterm.c (x_connection_closed): For GTK: If this is the last diff --git a/src/buffer.c b/src/buffer.c index 366f02a6378..1ccb2f70e7d 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1802,7 +1802,10 @@ the window-buffer correspondences. */) } err = no_switch_window (selected_window); - if (err) error (err); + if (err) + /* If can't display in current window, let pop-to-buffer + try some other window. */ + return call3 (intern ("pop-to-buffer"), buffer, Qnil, norecord); return switch_to_buffer_1 (buffer, norecord); }