From: Gerd Moellmann Date: Fri, 28 Jan 2000 17:33:50 +0000 (+0000) Subject: (Fother_buffer): Don't call Fset_buffer_major_mode X-Git-Tag: emacs-pretest-21.0.90~5215 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dba1a30ab8552925661e2bdb3bb77439aa7e173b;p=emacs.git (Fother_buffer): Don't call Fset_buffer_major_mode for *scratch* if it already existed. --- diff --git a/src/buffer.c b/src/buffer.c index 871a152484e..2fb9fefd5e9 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -961,8 +961,12 @@ If BUFFER is omitted or nil, some interesting buffer is returned.") } if (!NILP (notsogood)) return notsogood; - buf = Fget_buffer_create (build_string ("*scratch*")); - Fset_buffer_major_mode (buf); + buf = Fget_buffer (build_string ("*scratch*")); + if (NILP (buf)) + { + buf = Fget_buffer_create (build_string ("*scratch*")); + Fset_buffer_major_mode (buf); + } return buf; }