]> git.eshelyaron.com Git - emacs.git/commit
Inhibit undo-in-region for mouse-drag-region (bug#37700)
authorMattias Engdegård <mattiase@acm.org>
Thu, 31 Oct 2019 09:31:27 +0000 (10:31 +0100)
committerMattias Engdegård <mattiase@acm.org>
Thu, 31 Oct 2019 16:41:29 +0000 (17:41 +0100)
commitd75794fd5c168fb76406b88e231d8749160f934a
treef2ca99dbdca855ddc4d182658fda10233c44cac3
parent111a95fe6d209aff6e7f26cb6777fbdf02aae15d
Inhibit undo-in-region for mouse-drag-region (bug#37700)

'mouse-drag-region' leaves the region active around the dragged text,
so a straight undo did not revert the entire operation.  To remedy
this, inhibit undo-in-region when the last command was
mouse-drag-region.  (Method suggested by Stefan Monnier.)

* lisp/mouse.el (undo-drag-region): Set the undo-inhibit-region property.
* lisp/simple.el (undo): Inhibit undo-in-region if the last command
had the undo-inhibit-region property set.
* doc/lispref/symbols.texi (Standard Properties):
* doc/lispref/text.texi (Undo): Document undo-inhibit-region.
* etc/NEWS: Announce the property.
doc/lispref/symbols.texi
doc/lispref/text.texi
etc/NEWS
lisp/mouse.el
lisp/simple.el