From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Handling of [mouse-movement] and exiting isearch Date: Mon, 09 Nov 2020 17:40:02 +0200 Message-ID: <83361i5yjx.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4297"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Daniel =?utf-8?Q?Mart=C3=ADn?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 09 16:40:57 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kc9Hr-0000zy-RM for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Nov 2020 16:40:55 +0100 Original-Received: from localhost ([::1]:55068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kc9Hq-0004ec-Tu for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Nov 2020 10:40:54 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kc9H0-00049H-2j for emacs-devel@gnu.org; Mon, 09 Nov 2020 10:40:02 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45406) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kc9Gy-0000WO-P9; Mon, 09 Nov 2020 10:40:00 -0500 Original-Received: from [176.228.60.248] (port=3499 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kc9Gu-0004Q3-3l; Mon, 09 Nov 2020 10:39:58 -0500 In-Reply-To: (message from Daniel =?utf-8?Q?Mart?= =?utf-8?Q?=C3=ADn?= on Mon, 09 Nov 2020 01:09:50 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:258947 Archived-At: > From: Daniel Martín > 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?