org-src.el (org-edit-src-exit): Don't modify the undo list when inserting the code

* org-src.el (org-edit-src-exit): Don't modify the undo list when
inserting the code.
This commit is contained in:
Aaron Ecay 2013-03-08 18:31:14 +01:00 committed by Bastien Guerry
parent c810fd0472
commit 50226db65d
1 changed files with 6 additions and 5 deletions

View File

@ -737,11 +737,12 @@ with \",*\", \",#+\", \",,*\" and \",,#+\"."
(kill-buffer buffer))
(goto-char beg)
(when allow-write-back-p
(delete-region beg (max beg end))
(unless (string-match "\\`[ \t]*\\'" code)
(insert code))
(goto-char beg)
(if single (just-one-space)))
(let ((buffer-undo-list t))
(delete-region beg (max beg end))
(unless (string-match "\\`[ \t]*\\'" code)
(insert code))
(goto-char beg)
(if single (just-one-space))))
(if (memq t (mapcar (lambda (overlay)
(eq (overlay-get overlay 'invisible)
'org-hide-block))