changeset 102466:13c12974c2f0

(Fswitch_to_buffer): Revert part of 2008-10-21's change.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 10 Mar 2009 03:35:27 +0000
parents 245a1f77b840
children f12ab46082b4
files src/ChangeLog src/buffer.c
diffstat 2 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Mar 10 01:05:39 2009 +0000
+++ b/src/ChangeLog	Tue Mar 10 03:35:27 2009 +0000
@@ -1,3 +1,7 @@
+2009-03-10  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* buffer.c (Fswitch_to_buffer): Revert part of 2008-10-21's change.
+
 2009-03-10  Chong Yidong  <cyd@stupidchicken.com>
 
 	* lread.c (Feval_buffer): Doc fix.
--- a/src/buffer.c	Tue Mar 10 01:05:39 2009 +0000
+++ b/src/buffer.c	Tue Mar 10 03:35:27 2009 +0000
@@ -1800,9 +1800,11 @@
 	record_buffer (buffer_or_name);
       return Fset_buffer (buffer_or_name);
     }
-
-  if (EQ (minibuf_window, selected_window)
-      || !NILP (Fwindow_dedicated_p (selected_window)))
+  else if (EQ (minibuf_window, selected_window)
+	   /* If `dedicated' is neither nil nor t, it means it's
+	      dedicatedness can be overridden by an explicit request
+	      such as a call to switch-to-buffer.  */
+	   || EQ (Fwindow_dedicated_p (selected_window), Qt))
     /* We can't use the selected window so let `pop-to-buffer' try some
        other window. */
     return call3 (intern ("pop-to-buffer"), buffer_or_name, Qnil, norecord);