]> git.eshelyaron.com Git - emacs.git/commit
Introduce new macro combine-change-calls
authorAlan Mackenzie <acm@muc.de>
Tue, 3 Apr 2018 16:16:49 +0000 (16:16 +0000)
committerAlan Mackenzie <acm@muc.de>
Tue, 3 Apr 2018 16:16:49 +0000 (16:16 +0000)
commit424103a6e351a6d2d8b94f86998c90fdf6afea27
tree230a4cf0b7db30c96df632fb6cdcfd552c96ecea
parent1233bcb0a78755ec4f3a925b84c15b1c6f715b1c
Introduce new macro combine-change-calls

This macro is a bit like combine-after-change-calls, but also works with a
non-null before-change-functions.  It suppresses the operation of the change
hooks on a possibly large sequence of buffer modifications, replacing them
with a single invocation of before-change-functions at the start, and a single
invocation of after-change-functions at the end.

* lisp/subr.el (undo--combining-change-calls): New variable.
(combine-change-calls-1, undo--wrap-and-run-primitive-undo): New functions.
(combine-change-calls): New macro.

* doc/lispref/text.texi (Change Hooks): Document combine-change-calls.

* etc/NEWS: Add an entry under "Lisp Changes" for combine-change-calls.
doc/lispref/text.texi
etc/NEWS
lisp/subr.el