changeset 73233:b4697c34c8fd

* help.el (describe-mode): For clicks on mode-line, use "@" interactive argument to get the major mode of the click instead of the current buffer. * isearch.el (isearch-mouse-2): Use new semantics of `key-binding' in order to better redirect mouse-2 clicks. Also allow default bindings to apply.
author David Kastrup <dak@gnu.org>
date Tue, 03 Oct 2006 14:03:46 +0000
parents 5f8a28d018b2
children 22387df8dfc7
files lisp/ChangeLog lisp/help.el lisp/isearch.el
diffstat 3 files changed, 14 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Oct 03 13:47:26 2006 +0000
+++ b/lisp/ChangeLog	Tue Oct 03 14:03:46 2006 +0000
@@ -1,3 +1,13 @@
+2006-10-03  David Kastrup  <dak@gnu.org>
+
+	* help.el (describe-mode): For clicks on mode-line, use "@"
+	interactive argument to get the major mode of the click instead of
+	the current buffer.
+
+	* isearch.el (isearch-mouse-2): Use new semantics of `key-binding'
+	in order to better redirect mouse-2 clicks.  Also allow default
+	bindings to apply.
+
 2006-10-03  Kim F. Storm  <storm@cua.dk>
 
 	* emacs-lisp/cl.el (pushnew-internal): Remove defvar.
--- a/lisp/help.el	Tue Oct 03 13:47:26 2006 +0000
+++ b/lisp/help.el	Tue Oct 03 14:03:46 2006 +0000
@@ -764,7 +764,7 @@
 For this to work correctly for a minor mode, the mode's indicator
 variable \(listed in `minor-mode-alist') must also be a function
 whose documentation describes the minor mode."
-  (interactive)
+  (interactive "@")
   (unless buffer (setq buffer (current-buffer)))
   (help-setup-xref (list #'describe-mode buffer)
 		   (interactive-p))
--- a/lisp/isearch.el	Tue Oct 03 13:47:26 2006 +0000
+++ b/lisp/isearch.el	Tue Oct 03 14:03:46 2006 +0000
@@ -1293,23 +1293,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