Mercurial > emacs
changeset 6363:e5d9ea7852bf
(Man-original-frame): New variable.
(Man-getpage-in-background): Save the frame that man was invoked in.
(Man-notify-when-ready): Restore it, if appropriate.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 15 Mar 1994 05:12:14 +0000 |
parents | a9363ff2d3c7 |
children | 59663885e8c7 |
files | lisp/man.el |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/man.el Tue Mar 15 04:32:39 1994 +0000 +++ b/lisp/man.el Tue Mar 15 05:12:14 1994 +0000 @@ -231,6 +231,7 @@ (make-variable-buffer-local 'Man-page-list) (make-variable-buffer-local 'Man-current-page) (make-variable-buffer-local 'Man-page-mode-string) +(make-variable-buffer-local 'Man-original-frame) (setq-default Man-sections-alist nil) (setq-default Man-refpages-alist nil) @@ -457,6 +458,9 @@ (require 'env) (message "Invoking man %s in background..." man-args) (setq buffer (generate-new-buffer bufname)) + (save-excursion + (set-buffer buffer) + (setq Man-original-frame (selected-frame))) (let ((process-environment (copy-sequence process-environment))) ;; Prevent any attempt to use display terminal fanciness. (setenv "TERM" "dumb") @@ -474,11 +478,17 @@ (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)) (pop-to-buffer man-buffer) (delete-other-windows)) ((eq Man-notify 'aggressive) + (and (frame-live-p Man-original-frame) + (select-frame Man-original-frame)) (pop-to-buffer man-buffer)) ((eq Man-notify 'friendly) + (and (frame-live-p Man-original-frame) + (select-frame Man-original-frame)) (display-buffer man-buffer 'not-this-window)) ((eq Man-notify 'polite) (beep)