]> git.eshelyaron.com Git - emacs.git/commitdiff
Temporary enable transient-mark-mode for rectangle selection
authorMattias Engdegård <mattiase@acm.org>
Sun, 1 Dec 2019 17:31:34 +0000 (18:31 +0100)
committerMattias Engdegård <mattiase@acm.org>
Sun, 1 Dec 2019 17:32:43 +0000 (18:32 +0100)
* lisp/mouse.el (mouse-drag-region-rectangle):
Enable transient-mark-mode during selection (bug#38431).

lisp/mouse.el

index bc05a35009e3f0d56abfe5777b1824e7294d8a98..32996b2eded590be51a1db274ed60e65ab666373 100644 (file)
@@ -2007,6 +2007,10 @@ This must be bound to a button-down mouse event."
           (setq dragged t)
           (mouse-minibuffer-check start-event)
           (deactivate-mark)
+          (setq-local transient-mark-mode
+                      (if (eq transient-mark-mode 'lambda)
+                          '(only)
+                        (cons 'only transient-mark-mode)))
           (posn-set-point start-pos)
           (rectangle-mark-mode)
           ;; Only tell rectangle about the exact column if we are possibly