Subject: Re: bug#78945: 30.1; C-x 4 4 and C-x 5 5 do not work with `dired-mouse-find-file'

From: Stefan Monnier <[email-masked]>
Date: Fri, 11 Jul 2025 10:18:00 -0400

> I also have a question: if I type "C-x 4 4" before a mouse-bound
> command that shows no buffer, does it mean that the next command
> (which could be arbitrary and unrelated) will be affected by the
> prefix?

Yes.  This is the undesirable consequence of the patch.  For a single
click, it is hard to fix this while still allowing `C-x 4 4` to apply to
double-click commands since after the first click we don't know yet if
another click is coming.

We could try and add some hack with a `pre-command-hook` such that after
a mouse event we disable the `C-x 4 4` if the next event is not among
a specific subset of events (e.g. after a down event we keep the `C-x
4 4` alive but only if the next event is the corresponding up event).

I'm not sure it's worth the trouble: most commands show no buffer, so in
most cases the arbitrary/unrelated next command will not be affected by
the lingering prefix anyway.

        Stefan