[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#3938: 23.0.96; regression: minibuffer-message interferes with C-u

From: Drew Adams
Subject: bug#3938: 23.0.96; regression: minibuffer-message interferes with C-u
Date: Sun, 26 Jul 2009 16:30:44 -0700

emacs -Q
Eval these:

(defun test-univ-arg ()
  (setq prefix-arg                     (list 4)
        universal-argument-num-events  (length (this-command-keys)))
  (minibuffer-message "FOO") ; NO GOOD. OK ONLY IF THIS IS REMOVED
(defun test2 () (interactive) (describe-function '+))
(define-key minibuffer-local-completion-map "\C-f" 'test2)
(define-key minibuffer-local-completion-map
  (vector 'remap 'universal-argument) 'test-univ-arg)
Note that the definition of `test-univ-arg' is identical to the
definition of `universal-argument', except for the addition of the
call to `minibuffer-message'.

1. Now do this, without waiting for the 2-sec delay after C-u.
That is, hit C-f immediately after C-u.
M-x C-u C-f
2. Now do `M-x C-u C-f' again, this time waiting for the delay,
so the minibuffer message `FOO' is no longer displayed, before
hitting `C-f'.
#2 has the correct behavior: the input event `C-f' interrupts the
minibuffer message and immediately executes the `C-f' command (the
particular command used is immaterial; I use `describe-function'
just to easily see whether it is executed).
In Emacs 23, #1 has this incorrect effect: After C-u, the minibuffer
message FOO is erased, but the `C-f' is not picked up. You must
repeat `C-f' a second time, to get it to be picked up.

Note that if you hit C-f twice even very quickly, then the second
`C-f' is picked up (but not the first). IOW, the problem doesn't
seem to be that the delay has not passed. It seems to be that
only the first input event is ignored if the delay has not
expired. It's hard to hit C-f twice quickly, so I'm not certain
about this, but it seems to be the case.

In Emacs prior to Emacs 23, #1 also had the correct behavior of #2.
IOW, this is a regression.

In GNU Emacs (i386-mingw-nt5.1.2600)
 of 2009-07-09 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'

reply via email to

[Prev in Thread] Current Thread [Next in Thread]