diff options
| author | Gerd Moellmann <gerd@gnu.org> | 2000-01-28 17:33:50 +0000 |
|---|---|---|
| committer | Gerd Moellmann <gerd@gnu.org> | 2000-01-28 17:33:50 +0000 |
| commit | dba1a30ab8552925661e2bdb3bb77439aa7e173b (patch) | |
| tree | ef92205d71fcc8ac0030d2c0f01176001acd5203 | |
| parent | ae1aa776d6e10ec30ff76b89ed71ff5ad1b752af (diff) | |
| download | emacs-dba1a30ab8552925661e2bdb3bb77439aa7e173b.tar.gz | |
(Fother_buffer): Don't call Fset_buffer_major_mode
for *scratch* if it already existed.
| -rw-r--r-- | src/buffer.c | 8 |
1 files 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; } |
