diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e81e528b8..0b83d4c30 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-08-03 Carsten Dominik + * 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 diff --git a/lisp/org-macs.el b/lisp/org-macs.el index d29a7225b..4378c1b36 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -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)