diff lisp/comint/comint.el @ 207:e45d5e7c476e r20-4b2

Import from CVS: tag r20-4b2
author cvs
date Mon, 13 Aug 2007 10:03:52 +0200
parents 929b76928fce
children
line wrap: on
line diff
--- a/lisp/comint/comint.el	Mon Aug 13 10:02:48 2007 +0200
+++ b/lisp/comint/comint.el	Mon Aug 13 10:03:52 2007 +0200
@@ -228,7 +228,8 @@
 See also `comint-read-input-ring' and `comint-write-input-ring'.
 
 This variable is buffer-local, and is a good thing to set in mode hooks."
-  :type 'boolean
+  :type '(choice (const :tag "None" nil)
+	         (file))
   :group 'comint)
 
 (defcustom comint-scroll-to-bottom-on-input nil
@@ -262,14 +263,21 @@
 		 (const others))
   :group 'comint)
 
-;; XEmacs - Default this to nil: this is just horrible
-(defcustom comint-scroll-show-maximum-output nil
+(defcustom comint-scroll-show-maximum-output t
   "*Controls how interpreter output causes window to scroll.
 If non-nil, then show the maximum output when the window is scrolled.
 
+You may set this to an integer number of lines to keep shown, or a
+floating point percentage of the window size to keep filled.
+A negative number expresses a distance from the bottom, as when using
+a prefix argument with `recenter' (bound to `\\[recenter]').
+
 See variable `comint-scroll-to-bottom-on-output' and function
 `comint-postoutput-scroll-to-bottom'.  This variable is buffer-local."
-  :type 'boolean
+  :type '(choice (const :tag "Off" nil)
+		 (const :tag "On" t)
+		 (integer :tag "Number of lines" 20)
+		 (number :tag "Decimal Percent of window" .85))
   :group 'comint)
 
 (defcustom comint-buffer-maximum-size 1024
@@ -1584,14 +1592,15 @@
 		       (set-window-point window (point-max))
 		       (recenter
 			;; XEmacs - lemacs addition
-;;                         (cond ((integerp comint-scroll-show-maximum-output)
-;;                                comint-scroll-show-maximum-output)
-;;                               ((floatp comint-scroll-show-maximum-output)
-;;                                (floor (* (window-height window)
-;;                                          comint-scroll-show-maximum-output)
-;;                                       1))
-;;                               (t
-;;                                -1))
+                         (cond ((integerp comint-scroll-show-maximum-output)
+                                comint-scroll-show-maximum-output)
+                               ((floatp comint-scroll-show-maximum-output)
+                                (floor (* (window-height window)
+                                          comint-scroll-show-maximum-output)
+                                       1))
+                               (t
+                                -1))
+			 window
 			 )))
 		 ))))
 	 nil t))))