Commit 4b488a29 authored by Paul Eggert's avatar Paul Eggert
Browse files

Fix generate-new-buffer-name increment typo

Problem reported by Chaitanya Koparkar (Bug#23394).
* src/buffer.c (Fgenerate_new_buffer_name): Increment count when
generating a new buffer.  This fixes a typo I introduced in
2014-04-05T00:04:58Z!eggert@cs.ucla.edu.
parent 25e95b5d
...@@ -1077,7 +1077,7 @@ is first appended to NAME, to speed up finding a non-existent buffer. */) ...@@ -1077,7 +1077,7 @@ is first appended to NAME, to speed up finding a non-existent buffer. */)
{ {
char number[INT_BUFSIZE_BOUND (ptrdiff_t) + sizeof "<>"]; char number[INT_BUFSIZE_BOUND (ptrdiff_t) + sizeof "<>"];
AUTO_STRING_WITH_LEN (lnumber, number, AUTO_STRING_WITH_LEN (lnumber, number,
sprintf (number, "<%"pD"d>", count)); sprintf (number, "<%"pD"d>", ++count));
Lisp_Object gentemp = concat2 (genbase, lnumber); Lisp_Object gentemp = concat2 (genbase, lnumber);
if (!NILP (Fstring_equal (gentemp, ignore)) if (!NILP (Fstring_equal (gentemp, ignore))
|| NILP (Fget_buffer (gentemp))) || NILP (Fget_buffer (gentemp)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment