summaryrefslogtreecommitdiff
path: root/lisp/help-macro.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-07-16 18:48:37 +0000
committerRichard M. Stallman <rms@gnu.org>1994-07-16 18:48:37 +0000
commit2d00649675487c7c6ab16fa301ce84460cf4c758 (patch)
tree634b7d4ed9429f46154d7de5fe4852897310ca35 /lisp/help-macro.el
parent23287f792f0bf996cd6678b6ed5d73803a352d21 (diff)
downloademacs-2d00649675487c7c6ab16fa301ce84460cf4c758.tar.gz
(make-help-screen): Handle case where *Help* comes up in a separate frame.
Diffstat (limited to 'lisp/help-macro.el')
-rw-r--r--lisp/help-macro.el15
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."
;; and where we execute the chosen help command.
(local-map (make-sparse-keymap))
(minor-mode-map-alist nil)
- config key char)
+ (prev-frame (selected-frame))
+ config new-frame key char)
(unwind-protect
(progn
(setcdr local-map (, helped-map))
@@ -113,13 +114,20 @@ and then returns."
(progn
(setq config (current-window-configuration))
(switch-to-buffer-other-window "*Help*")
+ (if (not (eq (window-frame (selected-window))
+ prev-frame))
+ (setq new-frame (window-frame (selected-window))
+ config nil))
(erase-buffer)
(insert help-screen)
(goto-char (point-min))
(while (or (memq char (cons help-char '(?? ?\C-v ?\ ?\177 delete ?\M-v)))
+ (eq (car-safe char) 'switch-frame)
(equal key "\M-v"))
(condition-case nil
(progn
+ (if (eq (car-safe char) 'switch-frame)
+ (handle-switch-frame char))
(if (memq char '(?\C-v ?\ ))
(scroll-up))
(if (or (memq char '(?\177 ?\M-v delete))
@@ -149,9 +157,12 @@ and then returns."
(progn
(set-window-configuration config)
(setq config nil)))
- (setq overriding-local-map nil)
+ (if new-frame
+ (progn (iconify-frame new-frame)
+ (setq new-frame nil)))
(call-interactively defn))
(ding)))))
+ (if new-frame (iconify-frame new-frame))
(if config
(set-window-configuration config))))))
))