mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-23 07:18:53 +00:00
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.
This commit is contained in:
parent
2395c3eff1
commit
cc7acb65ff
@ -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))))
|
(setq org-edit-src-saved-temp-window-config nil))))
|
||||||
|
|
||||||
(defmacro org-src-in-org-buffer (&rest body)
|
(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
|
(save-window-excursion
|
||||||
(org-edit-src-exit 'save)
|
(org-edit-src-exit 'save)
|
||||||
,@body
|
,@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))
|
(let ((org-src-window-setup 'current-window))
|
||||||
(org-edit-src-code 'save))
|
(org-edit-src-code 'save))
|
||||||
(org-edit-src-code 'save)))
|
(org-edit-src-code 'save)))
|
||||||
|
(setq buffer-undo-list ul)
|
||||||
(push-mark m 'nomessage)
|
(push-mark m 'nomessage)
|
||||||
(goto-char (min p (point-max)))
|
(goto-char (min p (point-max)))
|
||||||
(message (or msg ""))))
|
(message (or msg ""))))
|
||||||
|
Loading…
Reference in New Issue
Block a user