summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-01-24 14:59:54 +0100
committerBastien Guerry <bzg@altern.org>2012-01-24 14:59:54 +0100
commitcc7acb65fff77f5662508254e9caec61dda8147d (patch)
tree2ed15820a0b18382e146e4f19931bb539f852aa9
parent2395c3eff129c9704ca40116a6c2f6fa6a4d3d68 (diff)
downloadorg-mode-cc7acb65fff77f5662508254e9caec61dda8147d.tar.gz
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.
-rw-r--r--lisp/org-src.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-src.el b/lisp/org-src.el
index 8cdf81e..e85e04e 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 ""))))