changeset 7268:e10dea2787a8

(Man-notify-when-ready): In newframe case, use save-excursion.
author Richard M. Stallman <rms@gnu.org>
date Mon, 02 May 1994 06:01:55 +0000
parents 4aa70d4d981c
children 66715349c911
files lisp/man.el
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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))