diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-09-04 06:52:25 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-09-04 06:52:25 +0000 |
commit | c9bf42f9d1bcb3047e0600baa9eeeceb0dc8c876 (patch) | |
tree | e71ad9bf8986a00b71a0ceaf28bf456312a90cf9 /lisp/man.el | |
parent | 5baff9cebfc2787f3c7dd2912371eccb987a8771 (diff) | |
download | emacs-c9bf42f9d1bcb3047e0600baa9eeeceb0dc8c876.tar.gz |
(Man-notify-when-ready): Get Man-original-frame from the proper buffer.
Diffstat (limited to 'lisp/man.el')
-rw-r--r-- | lisp/man.el | 71 |
1 files changed, 37 insertions, 34 deletions
diff --git a/lisp/man.el b/lisp/man.el index a141baf1f11..714356303c4 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -481,40 +481,43 @@ start a background process even if a buffer already exists and (defun Man-notify-when-ready (man-buffer) "Notify the user when MAN-BUFFER is ready. See the variable `Man-notify' for the different notification behaviors." - (cond - ((eq Man-notify 'newframe) - ;; 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) - (make-frame Man-frame-parameters))) - ((eq Man-notify 'bully) - (and window-system - (frame-live-p Man-original-frame) - (select-frame Man-original-frame)) - (pop-to-buffer man-buffer) - (delete-other-windows)) - ((eq Man-notify 'aggressive) - (and window-system - (frame-live-p Man-original-frame) - (select-frame Man-original-frame)) - (pop-to-buffer man-buffer)) - ((eq Man-notify 'friendly) - (and window-system - (frame-live-p Man-original-frame) - (select-frame Man-original-frame)) - (display-buffer man-buffer 'not-this-window)) - ((eq Man-notify 'polite) - (beep) - (message "Manual buffer %s is ready." (buffer-name man-buffer))) - ((eq Man-notify 'quiet) - (message "Manual buffer %s is ready." (buffer-name man-buffer))) - ((or (eq Man-notify 'meek) - t) - (message "")) - )) + (let ((saved-frame (save-excursion + (set-buffer man-buffer) + Man-original-frame))) + (cond + ((eq Man-notify 'newframe) + ;; 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) + (make-frame Man-frame-parameters))) + ((eq Man-notify 'bully) + (and window-system + (frame-live-p saved-frame) + (select-frame saved-frame)) + (pop-to-buffer man-buffer) + (delete-other-windows)) + ((eq Man-notify 'aggressive) + (and window-system + (frame-live-p saved-frame) + (select-frame saved-frame)) + (pop-to-buffer man-buffer)) + ((eq Man-notify 'friendly) + (and window-system + (frame-live-p saved-frame) + (select-frame saved-frame)) + (display-buffer man-buffer 'not-this-window)) + ((eq Man-notify 'polite) + (beep) + (message "Manual buffer %s is ready." (buffer-name man-buffer))) + ((eq Man-notify 'quiet) + (message "Manual buffer %s is ready." (buffer-name man-buffer))) + ((or (eq Man-notify 'meek) + t) + (message "")) + ))) (defun Man-set-fonts () (goto-char (point-min)) |