GNU bug report logs - #23007
24.5; buggy interactive search with middle click

Previous Next

Package: emacs;

Reported by: Vincent Lefevre <vincent <at> vinc17.net>

Date: Mon, 14 Mar 2016 03:11:02 UTC

Severity: normal

Tags: fixed, patch

Found in version 24.5

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: npostavs <at> users.sourceforge.net
Cc: Vincent Lefevre <vincent <at> vinc17.net>, Alex <agrambot <at> gmail.com>, 23007 <at> debbugs.gnu.org
Subject: bug#23007: 24.5; buggy interactive search with middle click
Date: Mon, 29 May 2017 18:07:49 -0700 (PDT)
> >> > +      (let ((overriding-terminal-local-map nil))
> >> > +        (setq binding (key-binding (this-command-keys-vector) t)))
> >>
> >> IMO, it would be better style to do something like
> >>
> >> (let ((binding (let ((overriding-terminal-local-map nil))
> >>                  (key-binding (this-command-keys-vector) t))))
> >>   ...)
> >
> > (let* ((overriding-terminal-local-map nil)
> >        (binding (key-binding (this-command-keys-vector) t)))
> >   ...)
> 
> Check https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__debbugs.gnu.org_cgi_bugreport.cgi-3Fbug-3D23007-
> 238&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=qZLZosY6GBAaJtO
> G9v8QX7nD4BS9t9s5otgxC3d4IFU&m=eZ-Uw6bQQfS-_CFDf_e3zupcjOhlrCnDnq5pNm6-
> bao&s=e0BQOMr3F7kitlASNZ_EMEy-LvwMn0CsRuZUecvrYZg&e= , we need to
> avoid binding `overriding-terminal-local-map' in "...".

Clearly I, like you, meant that this let is for only the second
`if' clause.  But these are only style differences.

If it were I, I'd also move the let-binding that is used only
in the first `if' clause into the `if' test.  (And I'd ensure
that there is in fact a mark.)

(if (let ((win (posn-window (event-start click))))
      (and (window-minibuffer-p win)
           (not (minibuffer-window-active-p win))
           (mark)))
    (isearch-yank-x-selection)
  (let* ((overriding-terminal-local-map nil)
         (binding (key-binding (this-command-keys-vector) t)))
    (when (functionp binding) (call-interactively binding))))




This bug report was last modified 8 years and 42 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.