Commit c63dc4a2 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(Fdisplay_buffer): Fix prev change--return selected window.

parent 3b9f7964
......@@ -1888,23 +1888,35 @@ Returns the window displaying BUFFER.")
{
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;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment