From cc7acb65fff77f5662508254e9caec61dda8147d Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Tue, 24 Jan 2012 14:59:54 +0100 Subject: [PATCH] org-src.el: Save and restore `buffer-undo-list' after editing. * org-src.el (org-src-in-org-buffer): Save and restore `buffer-undo-list' after editing. Thanks to Peter Danenberg for this fix. --- lisp/org-src.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org-src.el b/lisp/org-src.el index 8cdf81ee4..e85e04ef6 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -661,7 +661,7 @@ the language, a switch telling if the content should be in a single line." (setq org-edit-src-saved-temp-window-config nil)))) (defmacro org-src-in-org-buffer (&rest body) - `(let ((p (point)) (m (mark)) msg) + `(let ((p (point)) (m (mark)) (ul buffer-undo-list) msg) (save-window-excursion (org-edit-src-exit 'save) ,@body @@ -670,6 +670,7 @@ the language, a switch telling if the content should be in a single line." (let ((org-src-window-setup 'current-window)) (org-edit-src-code 'save)) (org-edit-src-code 'save))) + (setq buffer-undo-list ul) (push-mark m 'nomessage) (goto-char (min p (point-max))) (message (or msg "")))) -- 2.11.4.GIT