summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 649ddbe1839..0d0f43e937b 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1077,7 +1077,8 @@ is first appended to NAME, to speed up finding a non-existent buffer. */)
CHECK_STRING (name);
- if (!NILP (Fstring_equal (name, ignore)) || NILP (Fget_buffer (name)))
+ if ((!NILP (ignore) && !NILP (Fstring_equal (name, ignore)))
+ || NILP (Fget_buffer (name)))
return name;
if (SREF (name, 0) != ' ') /* See bug#1229. */