summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2019-10-31 10:31:27 +0100
committerMattias EngdegÄrd <mattiase@acm.org>2019-10-31 17:41:29 +0100
commitd75794fd5c168fb76406b88e231d8749160f934a (patch)
treef2ca99dbdca855ddc4d182658fda10233c44cac3 /etc
parent111a95fe6d209aff6e7f26cb6777fbdf02aae15d (diff)
downloademacs-d75794fd5c168fb76406b88e231d8749160f934a.tar.gz
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.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS6
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index ee73d2414bd..7a76d90ed53 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -3102,6 +3102,12 @@ in other packages are now obsolete aliases of 'xor'.
Setting this on the first character of a help string disables
conversions via 'substitute-command-keys'.
++++
+** 'undo' can be made to ignore the active region for a command
+by setting 'undo-inhibit-region' symbol property of that command to
+non-nil. This is used by 'mouse-drag-region' to make the effect
+easier to undo immediately afterwards.
+
* Changes in Emacs 27.1 on Non-Free Operating Systems