From xemacs-m  Mon Mar 17 15:51:45 1997
Received: from mail.cis.ohio-state.edu (mail.cis.ohio-state.edu [164.107.8.55])
	by xemacs.org (8.8.5/8.8.5) with SMTP id PAA18379
	for <xemacs-beta@xemacs.org>; Mon, 17 Mar 1997 15:51:44 -0600 (CST)
Received: from calico.cis.ohio-state.edu (calico.cis.ohio-state.edu [164.107.142.11]) by mail.cis.ohio-state.edu (8.6.7/8.6.4) with ESMTP id QAA10700; Mon, 17 Mar 1997 16:51:33 -0500
Received: (ware@localhost) by calico.cis.ohio-state.edu (8.8.0/8.6.4) id QAA09715; Mon, 17 Mar 1997 16:51:33 -0500 (EST)
To: Pete Ware <ware@cis.ohio-state.edu>
Cc: xemacs-beta@xemacs.org
Subject: Re: Patch that allows help to increase size (another try)
References: <vwmhgiaxkne.fsf@calico.cis.ohio-state.edu>
From: Pete Ware <ware@cis.ohio-state.edu>
Date: 17 Mar 1997 16:51:29 -0500
In-Reply-To: Pete Ware's message of 17 Mar 1997 16:40:05 -0500
Message-ID: <vwmd8syxk4e.fsf@calico.cis.ohio-state.edu>
Lines: 36
X-Mailer: Gnus v5.4.26/XEmacs 19.15(beta99)

Let's try this again except allow the user to change
help-window-max-height and make it work if it is set to 0 (i.e. keep
the old behaviour).

The following patch allows the help buffer to increase in size
(before, it only decreased).  It adds a variable,
help-window-max-height, which indicates the maximum proportion of a
frame to use for help.  The default value is 0.5 (half the frame).

--pete


--- lisp/prim/help.el.orig	Mon Mar 17 15:59:31 1997
+++ lisp/prim/help.el	Mon Mar 17 16:48:53 1997
@@ -349,7 +349,8 @@
 the window.")
 
 (defvar help-window-config nil)
-
+(defvar help-window-max-height .5
+  "*Proportion of frame to use for help windows.")
 ;; Use this function for displaying help when C-h something is pressed
 ;; or in similar situations.  Do *not* use it when you are displaying
 ;; a help message and then prompting for input in the minibuffer --
@@ -384,6 +385,11 @@
                      (message
                       (substitute-command-keys "Type \\[switch-to-buffer-other-window] to restore the other window, \\[scroll-other-window] to scroll the help."))))
 	      (when temp-buffer-shrink-to-fit
+		(let* ((help-window-size (round (* help-window-max-height
+					    (frame-height (window-frame helpwin)))))
+		       (size (window-displayed-height helpwin)))
+		  (if (< size help-window-size)
+		      (enlarge-window (- help-window-size size) nil helpwin)))
 		(shrink-window-if-larger-than-buffer helpwin))))))))
 
 (defun describe-key (key)

