diff options
| -rw-r--r-- | lisp/man.el | 9 |
1 files 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 | |||
| 481 | See the variable `Man-notify' for the different notification behaviors." | 481 | See the variable `Man-notify' for the different notification behaviors." |
| 482 | (cond | 482 | (cond |
| 483 | ((eq Man-notify 'newframe) | 483 | ((eq Man-notify 'newframe) |
| 484 | (set-buffer man-buffer) | 484 | ;; Since we run asynchronously, perhaps while Emacs is waiting for input, |
| 485 | (new-frame Man-frame-parameters)) | 485 | ;; we must not leave a different buffer current. |
| 486 | ;; We can't rely on the editor command loop to reselect | ||
| 487 | ;; the selected window's buffer. | ||
| 488 | (save-excursion | ||
| 489 | (set-buffer man-buffer) | ||
| 490 | (new-frame Man-frame-parameters))) | ||
| 486 | ((eq Man-notify 'bully) | 491 | ((eq Man-notify 'bully) |
| 487 | (and (frame-live-p Man-original-frame) | 492 | (and (frame-live-p Man-original-frame) |
| 488 | (select-frame Man-original-frame)) | 493 | (select-frame Man-original-frame)) |