Subject: bug#13687: /srv/bzr/emacs/trunk r111878: * lisp/replace.el(read-regexp): Let-bind `default' to the first

From: Jambunathan K <[email-masked]>
Date: Sat, 09 Mar 2013 22:29:13 +0530

"Drew Adams" <[email-masked]> writes:

> Do you at least see why your *Messages* logged `exit-minibuffer'?

,---- In `read-regexp'
| +  (let ((user-defaults (read-regexp-defaults)))
| +    (unless (eq user-defaults t)
| +      (setq defaults user-defaults)
| +      (message "cmd: %s defaults: %S" this-command defaults)))
| +
`----

,----
| Global-Hi-Lock mode enabled
| Mark saved where search started
| cmd: highlight-regexp defaults: "\\_<hi-yellow\\_>"
| cmd: highlight-regexp defaults: "\\_<defface\\_>"
| cmd: highlight-phrase defaults: "min-colors"
| cmd: multi-occur-in-matching-buffers defaults: ":background"
| cmd: exit-minibuffer defaults: nil
| Searched 1 buffer; 10 matches for `yellow'
`----

>> Interestingly, I am attaching a long from *Messages* buffer 
>> and it looks like `this-command' is not reliable (Do you see 
>> `exit-minibuffer' in the logs.)
>>
>> cmd: exit-minibuffer defaults: nil
>
> Your code checks only (eq user-defaults t).  When `user-defaults' is nil, this
> returns nil.

The cmd is `exit-minibuffer'.  That corresponds to RET in minibuffer
map.  I have no other explanation.

Btw, your explanation is *totally* off the mark.  It talks about
defaults in my snippet and not the cmd.