From: Christopher Schmidt Date: Wed, 25 Jul 2012 09:43:12 +0000 (+0200) Subject: In pp-display-expression select old selected window only if it is still live (Bug... X-Git-Tag: emacs-24.2.90~1084 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f08088e354f5933e0df618c80ccbf2635bb45bef;p=emacs.git In pp-display-expression select old selected window only if it is still live (Bug#12034). * emacs-lisp/pp.el (pp-display-expression): Select old selected window only if it is still live (Bug#12034). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5dbd7fb4bf1..95f59c65fc7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-07-25 Christopher Schmidt + + * emacs-lisp/pp.el (pp-display-expression): Select old selected + window only if it is still live (Bug#12034). + 2012-07-25 Martin Rudalics * subr.el (redirect-frame-focus): Add advertised calling diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index 48e0d6d6a21..30c16b51b9e 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -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))) ))))))