Do not record undo information when adding/remove text properties

When this is done inside org-unmodified, undo information is not recorded.
This commit is contained in:
Carsten Dominik 2009-08-03 11:03:37 +02:00
parent 487f187c19
commit 6a722e5d2e
2 changed files with 7 additions and 2 deletions

View file

@ -1,5 +1,8 @@
2009-08-03 Carsten Dominik <carsten.dominik@gmail.com>
* org-macs.el (org-unmodified): Turn off recording undo
information while running inside the macro.
* org-indent.el (org-hide-leading-stars-before-indent-mode): New
variable.
(org-indent-mode): Remember and restore value of

View file

@ -44,10 +44,12 @@
`(and (boundp (quote ,var)) ,var))
(defmacro org-unmodified (&rest body)
"Execute body without changing `buffer-modified-p'."
"Execute body without changing `buffer-modified-p'.
Also, do not record undo information."
`(set-buffer-modified-p
(prog1 (buffer-modified-p)
(let (before-change-functions after-change-functions)
(let ((buffer-undo-list t)
before-change-functions after-change-functions)
,@body))))
(defmacro org-re (s)