# HG changeset patch # User Richard M. Stallman # Date 767858515 0 # Node ID e10dea2787a81f7ee022e529645a4a4d422ed317 # Parent 4aa70d4d981c0cf0304c3dbae756517c21340ec7 (Man-notify-when-ready): In newframe case, use save-excursion. diff -r 4aa70d4d981c -r e10dea2787a8 lisp/man.el --- a/lisp/man.el Mon May 02 05:16:59 1994 +0000 +++ b/lisp/man.el Mon May 02 06:01:55 1994 +0000 @@ -481,8 +481,13 @@ See the variable `Man-notify' for the different notification behaviors." (cond ((eq Man-notify 'newframe) - (set-buffer man-buffer) - (new-frame Man-frame-parameters)) + ;; Since we run asynchronously, perhaps while Emacs is waiting for input, + ;; we must not leave a different buffer current. + ;; We can't rely on the editor command loop to reselect + ;; the selected window's buffer. + (save-excursion + (set-buffer man-buffer) + (new-frame Man-frame-parameters))) ((eq Man-notify 'bully) (and (frame-live-p Man-original-frame) (select-frame Man-original-frame))