From: Martin Rudalics Date: Tue, 14 Nov 2017 09:09:24 +0000 (+0100) Subject: Make 'mouse-drag-and-drop-region' work with 'mouse-autoselect-window' non-nil X-Git-Tag: emacs-26.0.91~312 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ff7bd84;p=emacs.git Make 'mouse-drag-and-drop-region' work with 'mouse-autoselect-window' non-nil * lisp/mouse.el (mouse-drag-and-drop-region): Ignore 'select-window' events to make it work with 'mouse-autoselect-window'. --- diff --git a/lisp/mouse.el b/lisp/mouse.el index 5eeee1ec52c..545a7ff2a02 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -2380,7 +2380,9 @@ is copied instead of being cut." ;; When event was click instead of drag, skip loop (while (progn (setq event (read-event)) - (mouse-movement-p event)) + (or (mouse-movement-p event) + ;; Handle `mouse-autoselect-window'. + (eq (car event) 'select-window))) (unless value-selection ; initialization (delete-overlay mouse-secondary-overlay) (setq value-selection (buffer-substring start end))