Subject: Re: bug#4117: 23.1; isearch + isearch-allow-scroll loses shift

From: Stefan Monnier <[email-masked]>
Date: Mon, 17 Aug 2009 11:07:36 -0400

> Index: lisp/isearch.el
> ===================================================================
> RCS file: /sources/emacs/emacs/lisp/isearch.el,v
> retrieving revision 1.345
> diff -u -r1.345 isearch.el
> --- lisp/isearch.el	14 Feb 2009 09:04:46 -0000	1.345
> +++ lisp/isearch.el	17 Aug 2009 00:47:38 -0000
> @@ -1900,6 +1905,12 @@
>            ((and isearch-allow-scroll
>                  (progn (setq key (isearch-reread-key-sequence-naturally keylist))
>                         (setq keylist (listify-key-sequence key))
> +                       (when this-command-keys-shift-translated
> +                         (setq keylist (list
> +                                        (event-convert-list
> +                                         (append (cons 'shift (event-modifiers keylist))
> +                                                 (list (event-basic-type keylist))))))
> +                         (setq this-command-keys-shift-translated nil))
>                         (setq main-event (aref key 0))
>                         (setq scroll-command (isearch-lookup-scroll-key key))))
>             ;; From this point onwards, KEY, KEYLIST and MAIN-EVENT hold a

If this works, it's good, but it shouldn't be installed as is: this has
no business being in isearch.el since other packages may need to do
the same.  Please try to abstract some useful function that we can put
in subr.el and then use here in isearch.el.

        Stefan