]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fpop_to_buffer): Call Fset_buffer_major_mode if we create a buffer.
authorRichard M. Stallman <rms@gnu.org>
Mon, 6 Mar 1995 04:15:23 +0000 (04:15 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 6 Mar 1995 04:15:23 +0000 (04:15 +0000)
src/buffer.c

index 1ceec958a008a0d3adcd76dfc03c391488182a04..97c82a7468bc5c62e2c4929ae954bffbc9c14cfc 100644 (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));