In with-temp-buffer-window don't evaluate BODY within with-current-buffer (Bug#16816).
[bpt/emacs.git] / lisp / window.el
index 357d49d..72b3138 100644 (file)
@@ -189,8 +189,8 @@ argument replaces this)."
     `(let* ((,buffer (temp-buffer-window-setup ,buffer-or-name))
            (standard-output ,buffer)
            ,window ,value)
+       (setq ,value (progn ,@body))
        (with-current-buffer ,buffer
-        (setq ,value (progn ,@body))
         (setq ,window (temp-buffer-window-show ,buffer ,action)))
 
        (if (functionp ,quit-function)