In pp-display-expression select old selected window only if it is still live (Bug...
authorChristopher Schmidt <christopher@ch.ristopher.com>
Wed, 25 Jul 2012 09:43:12 +0000 (11:43 +0200)
committerMartin Rudalics <rudalics@gmx.at>
Wed, 25 Jul 2012 09:43:12 +0000 (11:43 +0200)
* emacs-lisp/pp.el (pp-display-expression): Select old selected
window only if it is still live (Bug#12034).

lisp/ChangeLog
lisp/emacs-lisp/pp.el

index 5dbd7fb..95f59c6 100644 (file)
@@ -1,3 +1,8 @@
+2012-07-25  Christopher Schmidt  <christopher@ch.ristopher.com>
+
+       * emacs-lisp/pp.el (pp-display-expression): Select old selected
+       window only if it is still live (Bug#12034).
+
 2012-07-25  Martin Rudalics  <rudalics@gmx.at>
 
        * subr.el (redirect-frame-focus): Add advertised calling
index 48e0d6d..30c16b5 100644 (file)
@@ -110,7 +110,8 @@ after OUT-BUFFER-NAME."
                         (progn
                           (select-window window)
                           (run-hooks 'temp-buffer-show-hook))
-                      (select-window old-selected)
+                      (when (window-live-p old-selected)
+                        (select-window old-selected))
                       (message "See buffer %s." out-buffer-name)))
                 (message "%s" (buffer-substring (point-min) (point)))
                 ))))))