From f3b5dd74daf4f9f1d8869f454c319f71e67992d9 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Tue, 3 Oct 2006 14:03:46 +0000 Subject: [PATCH] * 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. --- lisp/ChangeLog | 10 ++++++++++ lisp/help.el | 2 +- lisp/isearch.el | 11 +++-------- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6e7dd22ba80..582bf3f93b2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2006-10-03 David Kastrup + + * 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 * emacs-lisp/cl.el (pushnew-internal): Remove defvar. diff --git a/lisp/help.el b/lisp/help.el index b79e028b633..34b1a2fac61 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -764,7 +764,7 @@ descriptions of the minor modes, each on a separate page. 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)) diff --git a/lisp/isearch.el b/lisp/isearch.el index ef712b64654..a7d239aebc2 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1293,23 +1293,18 @@ If search string is empty, just beep." (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 -- 2.39.2