Fix org-src-edit interaction with undo.
commitcb53665e553b6d8b644b2e166d97be2bab753a98
authorAaron Ecay <aaronecay@gmail.com>
Wed, 28 Aug 2013 15:50:53 +0000 (28 11:50 -0400)
committerBastien Guerry <bzg@altern.org>
Sat, 22 Mar 2014 08:40:18 +0000 (22 09:40 +0100)
tree168fa3a3d15ef13b710bde57e1b7168b1f4b9cbf
parentb399ff0cba2382bf52d5bb6ef2b4a776fe0ac902
Fix org-src-edit interaction with undo.

* org-src.el (org-edit-src-exit): Place an undo boundary before
writing changes back to parent buffer.

The previous code attempted to preserve the undo information in the
indirect buffer editing the source code, but this interacts poorly
with the undo system, and can lead to undo operations scrambling the
buffer.  The new approach means that edits made in the indirect buffer
cannot be undone piece-by-piece (instead, all changes made in the
indirect buffer constitute one “change” from the point of view of
undo), but the misbehavior of undo is (hopefully) now avoided.
lisp/org-src.el