diff options
| author | Richard M. Stallman | 1994-09-04 06:52:25 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-09-04 06:52:25 +0000 |
| commit | c9bf42f9d1bcb3047e0600baa9eeeceb0dc8c876 (patch) | |
| tree | e71ad9bf8986a00b71a0ceaf28bf456312a90cf9 | |
| parent | 5baff9cebfc2787f3c7dd2912371eccb987a8771 (diff) | |
| download | emacs-c9bf42f9d1bcb3047e0600baa9eeeceb0dc8c876.tar.gz emacs-c9bf42f9d1bcb3047e0600baa9eeeceb0dc8c876.zip | |
(Man-notify-when-ready): Get Man-original-frame from the proper buffer.
| -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 | |||
| 481 | (defun Man-notify-when-ready (man-buffer) | 481 | (defun Man-notify-when-ready (man-buffer) |
| 482 | "Notify the user when MAN-BUFFER is ready. | 482 | "Notify the user when MAN-BUFFER is ready. |
| 483 | See the variable `Man-notify' for the different notification behaviors." | 483 | See the variable `Man-notify' for the different notification behaviors." |
| 484 | (cond | 484 | (let ((saved-frame (save-excursion |
| 485 | ((eq Man-notify 'newframe) | 485 | (set-buffer man-buffer) |
| 486 | ;; Since we run asynchronously, perhaps while Emacs is waiting for input, | 486 | Man-original-frame))) |
| 487 | ;; we must not leave a different buffer current. | 487 | (cond |
| 488 | ;; We can't rely on the editor command loop to reselect | 488 | ((eq Man-notify 'newframe) |
| 489 | ;; the selected window's buffer. | 489 | ;; Since we run asynchronously, perhaps while Emacs is waiting for input, |
| 490 | (save-excursion | 490 | ;; we must not leave a different buffer current. |
| 491 | (set-buffer man-buffer) | 491 | ;; We can't rely on the editor command loop to reselect |
| 492 | (make-frame Man-frame-parameters))) | 492 | ;; the selected window's buffer. |
| 493 | ((eq Man-notify 'bully) | 493 | (save-excursion |
| 494 | (and window-system | 494 | (set-buffer man-buffer) |
| 495 | (frame-live-p Man-original-frame) | 495 | (make-frame Man-frame-parameters))) |
| 496 | (select-frame Man-original-frame)) | 496 | ((eq Man-notify 'bully) |
| 497 | (pop-to-buffer man-buffer) | 497 | (and window-system |
| 498 | (delete-other-windows)) | 498 | (frame-live-p saved-frame) |
| 499 | ((eq Man-notify 'aggressive) | 499 | (select-frame saved-frame)) |
| 500 | (and window-system | 500 | (pop-to-buffer man-buffer) |
| 501 | (frame-live-p Man-original-frame) | 501 | (delete-other-windows)) |
| 502 | (select-frame Man-original-frame)) | 502 | ((eq Man-notify 'aggressive) |
| 503 | (pop-to-buffer man-buffer)) | 503 | (and window-system |
| 504 | ((eq Man-notify 'friendly) | 504 | (frame-live-p saved-frame) |
| 505 | (and window-system | 505 | (select-frame saved-frame)) |
| 506 | (frame-live-p Man-original-frame) | 506 | (pop-to-buffer man-buffer)) |
| 507 | (select-frame Man-original-frame)) | 507 | ((eq Man-notify 'friendly) |
| 508 | (display-buffer man-buffer 'not-this-window)) | 508 | (and window-system |
| 509 | ((eq Man-notify 'polite) | 509 | (frame-live-p saved-frame) |
| 510 | (beep) | 510 | (select-frame saved-frame)) |
| 511 | (message "Manual buffer %s is ready." (buffer-name man-buffer))) | 511 | (display-buffer man-buffer 'not-this-window)) |
| 512 | ((eq Man-notify 'quiet) | 512 | ((eq Man-notify 'polite) |
| 513 | (message "Manual buffer %s is ready." (buffer-name man-buffer))) | 513 | (beep) |
| 514 | ((or (eq Man-notify 'meek) | 514 | (message "Manual buffer %s is ready." (buffer-name man-buffer))) |
| 515 | t) | 515 | ((eq Man-notify 'quiet) |
| 516 | (message "")) | 516 | (message "Manual buffer %s is ready." (buffer-name man-buffer))) |
| 517 | )) | 517 | ((or (eq Man-notify 'meek) |
| 518 | t) | ||
| 519 | (message "")) | ||
| 520 | ))) | ||
| 518 | 521 | ||
| 519 | (defun Man-set-fonts () | 522 | (defun Man-set-fonts () |
| 520 | (goto-char (point-min)) | 523 | (goto-char (point-min)) |