]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix generate-new-buffer-name increment typo
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 30 Apr 2016 23:36:36 +0000 (16:36 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 30 Apr 2016 23:37:05 +0000 (16:37 -0700)
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.

src/buffer.c

index e0fbab600d1a7a78e06ac596a97b8a4f609dab55..06467d2cdc494d1585001479d758895be931e8d3 100644 (file)
@@ -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 "<>"];
       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)))