From f68254abf0915084d3072f09b5da08bd7fd7a8f2 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 29 Nov 2011 13:39:16 -0500 Subject: [PATCH] * lisp/isearch.el (isearch-yank-x-selection): Deactivate mark. --- lisp/ChangeLog | 4 ++++ lisp/isearch.el | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bdcd4bd191a..9948024d94c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-11-29 Stefan Monnier + + * isearch.el (isearch-yank-x-selection): Deactivate mark (bug#10022). + 2011-11-29 Chong Yidong * indent.el (indent-for-tab-command, indent-according-to-mode): diff --git a/lisp/isearch.el b/lisp/isearch.el index 6d95993bdd3..2a7f191bd81 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1548,7 +1548,10 @@ If search string is empty, just beep." (defun isearch-yank-x-selection () "Pull current X selection into search string." (interactive) - (isearch-yank-string (x-get-selection))) + (isearch-yank-string (x-get-selection)) + ;; If `x-get-selection' returned the text from the active region, + ;; then it "used" the mark which we should hence deactivate. + (when select-active-regions (deactivate-mark))) (defun isearch-mouse-2 (click) -- 2.11.4.GIT