]> git.eshelyaron.com Git - emacs.git/commit
Speed up duplicate-line by a factor of 2
authorMattias Engdegård <mattiase@acm.org>
Tue, 27 Jun 2023 15:00:11 +0000 (17:00 +0200)
committerMattias Engdegård <mattiase@acm.org>
Tue, 27 Jun 2023 15:05:54 +0000 (17:05 +0200)
commitcf4ccc58284de50959ea66b1cd2655ab2fa4d15b
tree65d6adea4b8aa13347ba7d6579b8fe7d8d3292ad
parenteca7394bdf2f57632238b2cf66c996b43cca2aef
Speed up duplicate-line by a factor of 2

* lisp/misc.el (duplicate-line): Add the newline to the string to be
inserted instead of inserting it separately.
This makes duplicate-line as fast as duplicate-dwim with a contiguous
region.  Both could easily be made faster yet by making the code more
complex.
lisp/misc.el