Function: undo--wrap-and-run-primitive-undo

undo--wrap-and-run-primitive-undo is a byte-compiled function defined in subr.el.gz.

Signature

(undo--wrap-and-run-primitive-undo BEG END LIST)

Documentation

Call primitive-undo on the undo elements in LIST.

This function is intended to be called purely by undo as the function in an (apply DELTA BEG END FUNNAME . ARGS) undo element. It invokes before-change-functions and after-change-functions once each for the entire region (BEG END) rather than once for each individual change.

Additionally the fresh "redo" elements which are generated on buffer-undo-list will themselves be "enclosed" in undo--wrap-and-run-primitive-undo.

Undo elements of this form are generated by the macro combine-change-calls.

Source Code

;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defun undo--wrap-and-run-primitive-undo (beg end list)
  "Call `primitive-undo' on the undo elements in LIST.

This function is intended to be called purely by `undo' as the
function in an \(apply DELTA BEG END FUNNAME . ARGS) undo
element.  It invokes `before-change-functions' and
`after-change-functions' once each for the entire region \(BEG
END) rather than once for each individual change.

Additionally the fresh \"redo\" elements which are generated on
`buffer-undo-list' will themselves be \"enclosed\" in
`undo--wrap-and-run-primitive-undo'.

Undo elements of this form are generated by the macro
`combine-change-calls'."
  (combine-change-calls beg end
			(while list
			  (setq list (primitive-undo 1 list)))))