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


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? I'm not sure if making [mouse-movement] not exit
isearch worked in the past but has regressed in recent versions of
Emacs, or if I'm not understanding the logic correctly.

Thanks.



       reply	other threads:[~2020-11-09  0:09 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 ` Daniel Martín [this message]
2020-11-09  3:37   ` Handling of [mouse-movement] and exiting isearch Stefan Monnier
2020-11-09 15:40   ` Eli Zaretskii
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=m14klzl7ap.fsf@yahoo.es \
    --to=mardani29@yahoo.es \
    --cc=emacs-devel@gnu.org \
    /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.