]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't delete selection after indent-rigidly
authorNoam Postavsky <npostavs@gmail.com>
Sun, 3 Jul 2016 18:00:19 +0000 (14:00 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Sat, 6 Aug 2016 20:16:02 +0000 (16:16 -0400)
* lisp/indent.el (indent-rigidly): Pass `deactivate-mark' as the ON-EXIT
function to `set-transient-map', this prevents `delete-selection-mode'
from deleting the text that was just indented (Bug #20408).

lisp/indent.el

index 0bbb5209e8aaa6b45e992150c637c9a50928e7fd..0f6c68dd626bf8b35d0e1b05cd615682a7e4677d 100644 (file)
@@ -218,7 +218,7 @@ indentation by specifying a large negative ARG."
         (message
         (substitute-command-keys
          "Indent region with \\<indent-rigidly-map>\\[indent-rigidly-left], \\[indent-rigidly-right], \\[indent-rigidly-left-to-tab-stop], or \\[indent-rigidly-right-to-tab-stop]."))
-        (set-transient-map indent-rigidly-map t))
+        (set-transient-map indent-rigidly-map t #'deactivate-mark))
     (save-excursion
       (goto-char end)
       (setq end (point-marker))