changeset 2398:0d9cbf4b25c8

(shrink-window-if-larger-than-buffer) Added doc string. Made argument optional, because window-buffer does the right thing with nil.
author Eric S. Raymond <esr@snark.thyrsus.com>
date Sun, 28 Mar 1993 06:24:42 +0000
parents 2b34a2ef4d63
children 808b03396f33
files lisp/electric.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/electric.el	Sun Mar 28 06:24:33 1993 +0000
+++ b/lisp/electric.el	Sun Mar 28 06:24:42 1993 +0000
@@ -29,7 +29,10 @@
 ;;; Code:
 
 ;; perhaps this should be in subr.el...
-(defun shrink-window-if-larger-than-buffer (window)
+(defun shrink-window-if-larger-than-buffer (&optional window)
+  "Shrink the WINDOW to be as small as possible to display its contents.  Do
+nothing if only one window is displayed or if the buffer contains more lines
+than the present window height."
   (save-excursion
     (set-buffer (window-buffer window))
     (let ((w (selected-window)) ;save-window-excursion can't win