* doc/emacs/killing.texi (Secondary Selection): Document it.
* lisp/isearch.el (isearch-mouse-2): Make isearch respond to
mouse-yank-at-point (bug#7787).
* lisp/mouse.el (mouse-yank-at-point): Mention it.
If @code{mouse-yank-at-point} is non-@code{nil}, @kbd{M-mouse-2} yanks
at point. Then it does not matter precisely where you click, or even
which of the frame's windows you click on. @xref{Mouse Commands}.
+This user option also as an effect on interactive search: If this
+variable is non-@code{nil}, yanking with the mouse anywhere in the
+frame will add the text to the search string.
@node Accumulating Text
@section Accumulating Text
** Isearch and Replace
++++
+*** Changes in how isearch responds to 'mouse-yank-at-point'.
+If a user does 'C-s' and then uses '<mouse-2>' ('mouse-yank-primary')
+outside the echo area, Emacs will, by default, end the isearch and
+yank the text where the mouse cursor is. In Emacs 29, if
+'mouse-yank-at-point' is non-nil, the text will be added to the
+isearch instead.
+
+++
*** New user option 'char-fold-override'.
Non-nil means that the default definitions of equivalent characters
;; Key search depends on mode (bug#47755)
(isearch-mode nil))
(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)
+ (if (or mouse-yank-at-point
+ (and (window-minibuffer-p w)
+ (not (minibuffer-window-active-p w)))) ; in echo area
+ (isearch-yank-x-selection)
(when (functionp binding)
(call-interactively binding)))))
:group 'editing)
(defcustom mouse-yank-at-point nil
- "If non-nil, mouse yank commands yank at point instead of at click."
+ "If non-nil, mouse yank commands yank at point instead of at click.
+This also allows yanking text into an isearch without moving the
+mouse cursor to the echo area."
:type 'boolean)
(defcustom mouse-drag-copy-region nil