diff lisp/isearch.el @ 90614:8dd8c8286063

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 460-475) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 145-152) - Merge from emacs--devo--0 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-118
author Miles Bader <miles@gnu.org>
date Sun, 15 Oct 2006 02:54:13 +0000
parents bb0e318b7c53 b4697c34c8fd
children e4e4a56ef723
line wrap: on
line diff
--- a/lisp/isearch.el	Thu Oct 05 12:20:23 2006 +0000
+++ b/lisp/isearch.el	Sun Oct 15 02:54:13 2006 +0000
@@ -1289,23 +1289,18 @@
 (defun isearch-mouse-2 (click)
   "Handle mouse-2 in Isearch mode.
 For a click in the echo area, invoke `isearch-yank-x-selection'.
-Otherwise invoke whatever mouse-2 is bound to outside of Isearch."
+Otherwise invoke whatever the calling mouse-2 command sequence
+is bound to outside of Isearch."
   (interactive "e")
   (let* ((w (posn-window (event-start click)))
 	 (overriding-terminal-local-map nil)
-	 (key (vector (event-basic-type click)))
-	 ;; FIXME: `key-binding' should accept an event as argument
-	 ;; and do all the overlay/text-properties lookup etc...
-	 (binding (with-current-buffer
-		      (if (window-live-p w) (window-buffer w) (current-buffer))
-		    (key-binding key))))
+	 (binding (key-binding (this-command-keys-vector) t)))
     (if (and (window-minibuffer-p w)
 	     (not (minibuffer-window-active-p w))) ; in echo area
 	(isearch-yank-x-selection)
       (when (functionp binding)
 	(call-interactively binding)))))
 
-
 (defun isearch-yank-internal (jumpform)
   "Pull the text from point to the point reached by JUMPFORM.
 JUMPFORM is a lambda expression that takes no arguments and returns a