all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Daniel Martín" <mardani29@yahoo.es>
Cc: emacs-devel@gnu.org
Subject: Re: Handling of [mouse-movement] and exiting isearch
Date: Mon, 09 Nov 2020 17:40:02 +0200	[thread overview]
Message-ID: <83361i5yjx.fsf@gnu.org> (raw)
In-Reply-To: <m14klzl7ap.fsf@yahoo.es> (message from Daniel Martín on Mon, 09 Nov 2020 01:09:50 +0100)

> 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?



  parent reply	other threads:[~2020-11-09 15:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m14klzl7ap.fsf.ref@yahoo.es>
2020-11-09  0:09 ` Handling of [mouse-movement] and exiting isearch Daniel Martín
2020-11-09  3:37   ` Stefan Monnier
2020-11-09 15:40   ` Eli Zaretskii [this message]
2020-11-12 22:56     ` Daniel Martín
2020-11-13  8:01       ` Eli Zaretskii
2020-11-13 10:50         ` Daniel Martín

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83361i5yjx.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=mardani29@yahoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.