From dba1a30ab8552925661e2bdb3bb77439aa7e173b Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Fri, 28 Jan 2000 17:33:50 +0000 Subject: [PATCH] (Fother_buffer): Don't call Fset_buffer_major_mode for *scratch* if it already existed. --- src/buffer.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; } -- 2.39.5