Subject: read-from-minibuffer does not preserve current-buffer

From: Stefan Monnier <[email-masked]>
Date: Mon, 29 Oct 2012 16:29:29 -0400

Package: Emacs
Version: 24.2.50

% src/emacs -Q --eval "(setq initial-frame-alist '((minibuffer . nil)))"
M-: (with-temp-buffer (list (read-string "toto: ") (current-buffer))) RET

In Emacs 24.2 this always shows the current-buffer to be the temp buffer
(which is a killed buffer by the time M-: prints its result).
But in Emacs trunk, the result depends on whether you issue the M-:
from the normal frame (where it works right) or from the special
minibuffer-only frame, where current-buffer after read-string is
*minibuf-0*!

This is a serious problem, which introduces subtle bugs that can be
pretty difficult to track down.

        Stefan