mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-27 19:31:38 +00:00
Fix the buffer-count patch (Bug#23394)
* src/buffer.c (Fgenerate_new_buffer_name): Increment count just once each time through the loop. Reported by Lars Ingebrigtsen in: http://lists.gnu.org/archive/html/emacs-devel/2016-04/msg00918.html
This commit is contained in:
parent
2b4c099822
commit
4d9e34e02c
@ -1073,11 +1073,11 @@ is first appended to NAME, to speed up finding a non-existent buffer. */)
|
||||
return genbase;
|
||||
}
|
||||
|
||||
for (ptrdiff_t count = 1; ; count++)
|
||||
for (ptrdiff_t count = 2; ; count++)
|
||||
{
|
||||
char number[INT_BUFSIZE_BOUND (ptrdiff_t) + sizeof "<>"];
|
||||
AUTO_STRING_WITH_LEN (lnumber, number,
|
||||
sprintf (number, "<%"pD"d>", ++count));
|
||||
sprintf (number, "<%"pD"d>", count));
|
||||
Lisp_Object gentemp = concat2 (genbase, lnumber);
|
||||
if (!NILP (Fstring_equal (gentemp, ignore))
|
||||
|| NILP (Fget_buffer (gentemp)))
|
||||
|
Loading…
Reference in New Issue
Block a user