Function: org-unmodified
org-unmodified is a macro defined in org-macs.el.
Signature
(org-unmodified &rest BODY)
Documentation
Run BODY while preserving the buffer's buffer-modified-p state.
Source Code
;; Defined in ~/.emacs.d/elpa/org-9.8.2/org-macs.el
;; Use `with-silent-modifications' to ignore cosmetic changes and
;; `org-unmodified' to ignore real text modifications.
(defmacro org-unmodified (&rest body)
"Run BODY while preserving the buffer's `buffer-modified-p' state."
(declare (debug (body)))
(org-with-gensyms (was-modified)
`(let ((,was-modified (buffer-modified-p)))
(unwind-protect
(let ((buffer-undo-list t)
(inhibit-modification-hooks t))
,@body)
(set-buffer-modified-p ,was-modified)))))