changeset 8260:1ad35b4d9128

(make-help-screen): Handle case where *Help* comes up in a separate frame.
author Richard M. Stallman <rms@gnu.org>
date Sat, 16 Jul 1994 18:48:37 +0000
parents 604d89082229
children 3eab4db14a5d
files lisp/help-macro.el
diffstat 1 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/help-macro.el	Sat Jul 16 17:58:12 1994 +0000
+++ b/lisp/help-macro.el	Sat Jul 16 18:48:37 1994 +0000
@@ -99,7 +99,8 @@
 		    ;; 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 @@
 			 (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 @@
 				   (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))))))
      ))