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:
parent
487f187c19
commit
6a722e5d2e
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue