diff options
| author | Richard M. Stallman | 1994-07-16 18:48:37 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-07-16 18:48:37 +0000 |
| commit | 8d2b0a2d0a77f0d57c4a91a546e0e230ed4125fc (patch) | |
| tree | 716411737c8d02e19dc0c8a77528d3585b9c8a54 | |
| parent | d536293f4b67398d8e9df1e3f6480588ff3d36fd (diff) | |
| download | emacs-8d2b0a2d0a77f0d57c4a91a546e0e230ed4125fc.tar.gz emacs-8d2b0a2d0a77f0d57c4a91a546e0e230ed4125fc.zip | |
(make-help-screen): Handle case where *Help* comes up in a separate frame.
| -rw-r--r-- | lisp/help-macro.el | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lisp/help-macro.el b/lisp/help-macro.el index ffce7d762e6..83e7b09b35c 100644 --- a/lisp/help-macro.el +++ b/lisp/help-macro.el | |||
| @@ -99,7 +99,8 @@ and then returns." | |||
| 99 | ;; and where we execute the chosen help command. | 99 | ;; and where we execute the chosen help command. |
| 100 | (local-map (make-sparse-keymap)) | 100 | (local-map (make-sparse-keymap)) |
| 101 | (minor-mode-map-alist nil) | 101 | (minor-mode-map-alist nil) |
| 102 | config key char) | 102 | (prev-frame (selected-frame)) |
| 103 | config new-frame key char) | ||
| 103 | (unwind-protect | 104 | (unwind-protect |
| 104 | (progn | 105 | (progn |
| 105 | (setcdr local-map (, helped-map)) | 106 | (setcdr local-map (, helped-map)) |
| @@ -113,13 +114,20 @@ and then returns." | |||
| 113 | (progn | 114 | (progn |
| 114 | (setq config (current-window-configuration)) | 115 | (setq config (current-window-configuration)) |
| 115 | (switch-to-buffer-other-window "*Help*") | 116 | (switch-to-buffer-other-window "*Help*") |
| 117 | (if (not (eq (window-frame (selected-window)) | ||
| 118 | prev-frame)) | ||
| 119 | (setq new-frame (window-frame (selected-window)) | ||
| 120 | config nil)) | ||
| 116 | (erase-buffer) | 121 | (erase-buffer) |
| 117 | (insert help-screen) | 122 | (insert help-screen) |
| 118 | (goto-char (point-min)) | 123 | (goto-char (point-min)) |
| 119 | (while (or (memq char (cons help-char '(?? ?\C-v ?\ ?\177 delete ?\M-v))) | 124 | (while (or (memq char (cons help-char '(?? ?\C-v ?\ ?\177 delete ?\M-v))) |
| 125 | (eq (car-safe char) 'switch-frame) | ||
| 120 | (equal key "\M-v")) | 126 | (equal key "\M-v")) |
| 121 | (condition-case nil | 127 | (condition-case nil |
| 122 | (progn | 128 | (progn |
| 129 | (if (eq (car-safe char) 'switch-frame) | ||
| 130 | (handle-switch-frame char)) | ||
| 123 | (if (memq char '(?\C-v ?\ )) | 131 | (if (memq char '(?\C-v ?\ )) |
| 124 | (scroll-up)) | 132 | (scroll-up)) |
| 125 | (if (or (memq char '(?\177 ?\M-v delete)) | 133 | (if (or (memq char '(?\177 ?\M-v delete)) |
| @@ -149,9 +157,12 @@ and then returns." | |||
| 149 | (progn | 157 | (progn |
| 150 | (set-window-configuration config) | 158 | (set-window-configuration config) |
| 151 | (setq config nil))) | 159 | (setq config nil))) |
| 152 | (setq overriding-local-map nil) | 160 | (if new-frame |
| 161 | (progn (iconify-frame new-frame) | ||
| 162 | (setq new-frame nil))) | ||
| 153 | (call-interactively defn)) | 163 | (call-interactively defn)) |
| 154 | (ding))))) | 164 | (ding))))) |
| 165 | (if new-frame (iconify-frame new-frame)) | ||
| 155 | (if config | 166 | (if config |
| 156 | (set-window-configuration config)))))) | 167 | (set-window-configuration config)))))) |
| 157 | )) | 168 | )) |