emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handling of [mouse-movement] and exiting isearch


From: Eli Zaretskii
Subject: Re: Handling of [mouse-movement] and exiting isearch
Date: Mon, 09 Nov 2020 17:40:02 +0200

> From: Daniel Martín <mardani29@yahoo.es>
> Date: Mon, 09 Nov 2020 01:09:50 +0100
> 
> 
> I'd like commands bound to [mouse-movement] to not exit isearch, and I'm
> confused by this code in isearch.el:
> 
>     ;; Pass frame events transparently so they won't exit the search.
>     ;; In particular, if we have more than one display open, then a
>     ;; switch-frame might be generated by someone typing at another keyboard.
>     (define-key map [switch-frame] nil)
>     (define-key map [delete-frame] nil)
>     (define-key map [iconify-frame] nil)
>     (define-key map [make-frame-visible] nil)
>     (define-key map [mouse-movement] nil)
>     (define-key map [language-change] nil)
> 
> The comment seems to imply that [mouse-movement], [language-change] and
> some frame-related events won't exit isearch.  However, the code is
> calling define-key and passsing KEY as nil, which means that the events
> will be undefined in isearch-mode-map, which by default means that they
> _will_ exit isearch, right? I think the code that implements this logic
> is in function isearch-pre-command-hook:
> 
>    ;; Don't exit Isearch for isearch key bindings.
>    ((or (commandp (lookup-key isearch-mode-map key nil))
>         (commandp
>          (lookup-key
>           `(keymap (tool-bar menu-item nil ,isearch-tool-bar-map))
>    key))))
> 
> What am I missing?

Stab in the dark: the isearch-scroll property of commands, perhaps?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]