+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.
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))
(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