Subject: bug#15200: isearch-other-meta-char and shift

From: Stefan Monnier <[email-masked]>
Date: Mon, 16 Sep 2013 22:19:02 -0400

> This happens after this code:

> 			(memq scroll-command
> 			      '(universal-argument
> 				negative-argument digit-argument))))))
>            (command-execute scroll-command)

This code can be simplified as follows: `scroll-command' can be removed,
instead its value is immediately available as `this-command'.

> Perhaps `command-execute' should be removed here.

Indeed.  For isearch-allow-prefix, that's all that's needed.

> It's not yet removed in this patch since I'm not sure
> because after moving its post-processing code:

>            (let ((ab-bel (isearch-string-out-of-window isearch-point)))
>              (if ab-bel
>                  (isearch-back-into-window (eq ab-bel 'above) isearch-point)
>                (goto-char isearch-point)))

Yes, this needs to be moved to post-command-hook.
Another alternative is to do something like

   (setq this-command
         `(lambda () (interactive)
            (let ((isearch-point (point)))
              (command-execute ',this-command)
              (let ((ab-bel (isearch-string-out-of-window isearch-point)))
                (if ab-bel
                   (isearch-back-into-window (eq ab-bel 'above) isearch-point)
                 (goto-char isearch-point))))))

but this is probably going to bring us more trouble than it's worth.

        Stefan