(Fpop_to_buffer): Call Fset_buffer_major_mode if we create a buffer.

This commit is contained in:
Richard M. Stallman 1995-03-06 04:15:23 +00:00
parent a6e0153c17
commit 7c2087eea5

View file

@ -1146,7 +1146,14 @@ window even if BUFFER is already visible in the selected window.")
if (NILP (bufname))
buf = Fother_buffer (Fcurrent_buffer (), Qnil);
else
buf = Fget_buffer_create (bufname);
{
buf = Fget_buffer (bufname);
if (NILP (buf))
{
buf = Fget_buffer_create (bufname);
Fset_buffer_major_mode (buf);
}
}
Fset_buffer (buf);
record_buffer (buf);
Fselect_window (Fdisplay_buffer (buf, other));