From ec334d84c036de531886bf1559ae591c3f77239a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 2 May 1994 06:01:55 +0000 Subject: [PATCH] (Man-notify-when-ready): In newframe case, use save-excursion. --- lisp/man.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/man.el b/lisp/man.el index 9d5c97bacaf..7fd87f7996d 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -481,8 +481,13 @@ start a background process even if a buffer already exists and 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)) -- 2.39.5