]> git.eshelyaron.com Git - emacs.git/commitdiff
(Man-notify-when-ready): In newframe case, use save-excursion.
authorRichard M. Stallman <rms@gnu.org>
Mon, 2 May 1994 06:01:55 +0000 (06:01 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 2 May 1994 06:01:55 +0000 (06:01 +0000)
lisp/man.el

index 9d5c97bacaf7c525b21e1fbc2c96ca216825b4a2..7fd87f7996de9544969604ec395a891e7279a835 100644 (file)
@@ -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))