summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2011-11-29 13:39:16 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2011-11-29 13:39:16 -0500
commitc935221f0bcd80ec64f34edb2e9439ed4373f687 (patch)
treebf1fd85eff2e30d80bf8be18f6600a1b529f98ef
parent2b56b87e029eaa04f243718c1690eca5545c5102 (diff)
downloademacs-c935221f0bcd80ec64f34edb2e9439ed4373f687.tar.gz
* lisp/isearch.el (isearch-yank-x-selection): Deactivate mark.
Fixes: debbugs:10022
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/isearch.el5
2 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b25374d1eb0..d6275c80374 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2011-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * isearch.el (isearch-yank-x-selection): Deactivate mark (bug#10022).
+
2011-11-29 Chong Yidong <cyd@gnu.org>
* 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)