Subject: bug#20953: 25.0.50; with icomplete, completion says "Matched" and then returns something else.

From: Dmitry Gutov <[email-masked]>
Date: Thu, 2 Jul 2015 04:40:42 +0300

On 07/02/2015 12:46 AM, Nicolas Richard wrote:

> I run
> emacs -Q -l ~/tmp/testcompletion.el
>
> then hit the following keys: C-h f m i n i b u f TAB RET
>
> After "TAB" I get :
> minibufferp [Matched]
> in the minibuffer.

I'm assuming that's because of (setq completion-cycle-threshold t).

> After "RET" I get a description of `minibuffer-depth' which is totally
> unexpected to me. I expected a description of the function `minibufferp'.

Apparently, that's because minibuffer-force-complete, called from 
minibuffer-force-complete-and-exit, somehow interprets it as a repeated 
invocation.

Maybe it should examine last-command and do something with it, instead 
of performing the completion-in-region voodoo it's doing now. Or 
minibuffer-force-complete-and-exit should call a non-cycling version.