aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2001-08-31 08:51:39 +0000
committerGerd Moellmann2001-08-31 08:51:39 +0000
commite4af142698f741ea60009dfbe8985c126522a927 (patch)
treee2ea4c61ab11d6f5591a394ac1571c7e9fdb0d94
parent6c1aa7f18ab51cb28bdfce1a7994bb08eddbee9b (diff)
downloademacs-e4af142698f741ea60009dfbe8985c126522a927.tar.gz
emacs-e4af142698f741ea60009dfbe8985c126522a927.zip
(isearch-mouse-2): Renamed from isearch-mouse-yank.
Instead of running mouse-yank-at-click, see what the event is bound to outside Isearch and run that.
-rw-r--r--lisp/isearch.el22
1 files changed, 16 insertions, 6 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 1de8fce8e3b..2392bf2935b 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -317,7 +317,7 @@ Default value, nil, means edit the string instead."
317 (define-key map "\C-^" 'isearch-toggle-specified-input-method) 317 (define-key map "\C-^" 'isearch-toggle-specified-input-method)
318 318
319 ;; People expect to be able to paste with the mouse. 319 ;; People expect to be able to paste with the mouse.
320 (define-key map [mouse-2] #'isearch-mouse-yank) 320 (define-key map [mouse-2] #'isearch-mouse-2)
321 (define-key map [down-mouse-2] nil) 321 (define-key map [down-mouse-2] nil)
322 322
323 ;; Some bindings you may want to put in your isearch-mode-hook. 323 ;; Some bindings you may want to put in your isearch-mode-hook.
@@ -1046,16 +1046,26 @@ If no previous match was done, just beep."
1046 (interactive) 1046 (interactive)
1047 (isearch-yank-string (x-get-selection))) 1047 (isearch-yank-string (x-get-selection)))
1048 1048
1049(defun isearch-mouse-yank (click arg) 1049
1050 "Yank with the mouse in Isearch mode. 1050(defun isearch-mouse-2 (click arg)
1051 "Handle mouse-2 in Isearch mode.
1051For a click in the echo area, invoke `isearch-yank-x-selection'. 1052For a click in the echo area, invoke `isearch-yank-x-selection'.
1052Otherwise invoke `mouse-yank-at-click'." 1053Otherwise invoke whatever mouse-2 is bound to outside of Isearch."
1053 (interactive "e\nP") 1054 (interactive "e\nP")
1054 (let ((w (posn-window (event-start click)))) 1055 (let* ((w (posn-window (event-start click)))
1056 (overriding-terminal-local-map nil)
1057 (key (vector (event-basic-type click)))
1058 (binding (key-binding key)))
1055 (if (and (window-minibuffer-p w) 1059 (if (and (window-minibuffer-p w)
1056 (not (minibuffer-window-active-p w))) ; in echo area 1060 (not (minibuffer-window-active-p w))) ; in echo area
1057 (isearch-yank-x-selection) 1061 (isearch-yank-x-selection)
1058 (mouse-yank-at-click click arg)))) 1062 (when binding
1063 ;; Kluge to allow passing ARG to functions that support it,
1064 ;; like mouse-yank-at-click.
1065 (if (equal (cadr (interactive-form binding)) "e\nP")
1066 (funcall binding click arg)
1067 (funcall binding click))))))
1068
1059 1069
1060(defun isearch-yank-word () 1070(defun isearch-yank-word ()
1061 "Pull next word from buffer into search string." 1071 "Pull next word from buffer into search string."