Mercurial > emacs
comparison lisp/man.el @ 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 | 3638923a6110 |
children | 120470ed3960 |
comparison
equal
deleted
inserted
replaced
7267:4aa70d4d981c | 7268:e10dea2787a8 |
---|---|
479 (defun Man-notify-when-ready (man-buffer) | 479 (defun Man-notify-when-ready (man-buffer) |
480 "Notify the user when MAN-BUFFER is ready. | 480 "Notify the user when MAN-BUFFER is ready. |
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)) |
489 (pop-to-buffer man-buffer) | 494 (pop-to-buffer man-buffer) |
490 (delete-other-windows)) | 495 (delete-other-windows)) |