]> git.eshelyaron.com Git - emacs.git/commit
replace-buffer-contents cleanups
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 24 Aug 2020 20:12:51 +0000 (13:12 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 24 Aug 2020 20:17:48 +0000 (13:17 -0700)
commite0345b4e86154f42f47a9f7bbbf458a72bf5c06d
tree6c1b31e29066b2effe859d037a57d5c7c9cf442a
parent08a6d14e4116c74284c12dd1319780afbcbbfd1d
replace-buffer-contents cleanups

* src/editfns.c (NOTE_DELETE, NOTE_INSERT): Avoid unnecessary parens.
(Freplace_buffer_contents): Check args before returning results.
Avoid integer overflow when computing too_expensive, and work even
if MAX-COSTS is bignum.  Call alloca and/or malloc just once, not
three times.
(set_bit, bit_is_set): Simplify micro-optimization by using eassume.
src/editfns.c