changeset 11003:71304a70d0f6

(Fdisplay_buffer): Fix prev change--return selected window.
author Richard M. Stallman <rms@gnu.org>
date Tue, 14 Mar 1995 18:39:58 +0000
parents ff115809a39e
children 0f6b7b33340a
files src/window.c
diffstat 1 files changed, 16 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Tue Mar 14 18:38:28 1995 +0000
+++ b/src/window.c	Tue Mar 14 18:39:58 1995 +0000
@@ -1888,23 +1888,35 @@
     {
       tem = Fmember (XBUFFER (buffer)->name, Vsame_window_buffer_names);
       if (!NILP (tem))
-	return Fswitch_to_buffer (buffer, Qnil);
+	{
+	  Fswitch_to_buffer (buffer, Qnil);
+	  return selected_window;
+	}
 
       tem = Fassoc (XBUFFER (buffer)->name, Vsame_window_buffer_names);
       if (!NILP (tem))
-	return Fswitch_to_buffer (buffer, Qnil);
+	{
+	  Fswitch_to_buffer (buffer, Qnil);
+	  return selected_window;
+	}
 
       for (tem = Vsame_window_regexps; CONSP (tem); tem = XCONS (tem)->cdr)
 	{
 	  Lisp_Object car = XCONS (tem)->car;
 	  if (STRINGP (car)
 	      && fast_string_match (car, XBUFFER (buffer)->name) >= 0)
-	    return Fswitch_to_buffer (buffer, Qnil);
+	    {
+	      Fswitch_to_buffer (buffer, Qnil);
+	      return selected_window;
+	    }
 	  else if (CONSP (car)
 		   && STRINGP (XCONS (car)->car)
 		   && fast_string_match (XCONS (car)->car,
 					 XBUFFER (buffer)->name) >= 0)
-	    return Fswitch_to_buffer (buffer, Qnil);
+	    {
+	      Fswitch_to_buffer (buffer, Qnil);
+	      return selected_window;
+	    }
 	}
     }