branch: elpa/eat
commit d85744b48ad064389b83d31e19afe54e96c02be7
Author: Akib Azmain Turja <[email protected]>
Commit: Akib Azmain Turja <[email protected]>
Yank active region with middle-click yank
* eat.el (eat-mouse-yank-primary): Select active region if
'select-active-regions' is non-nil.
---
eat.el | 3 +++
1 file changed, 3 insertions(+)
diff --git a/eat.el b/eat.el
index 8d2ded0e07..8b17743906 100644
--- a/eat.el
+++ b/eat.el
@@ -5108,6 +5108,9 @@ STRING and ARG are passed to `yank-pop', which see."
EVENT is the mouse event."
(interactive "e")
+ (when select-active-regions
+ (let (select-active-regions)
+ (deactivate-mark)))
(unless (windowp (posn-window (event-start event)))
(error "Position not in text area of window"))
(select-window (posn-window (event-start event)))