diff options
author | Eric S. Raymond <esr@snark.thyrsus.com> | 1993-03-28 06:24:42 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@snark.thyrsus.com> | 1993-03-28 06:24:42 +0000 |
commit | a04adb2a9c834b7957aa4129f46d1317cfc5022f (patch) | |
tree | fc7d3d58341f9291340a99a1cb9202ff09653b77 /lisp/electric.el | |
parent | f536481dfa361b606743b6c1ff11cdfd203e42cc (diff) | |
download | emacs-a04adb2a9c834b7957aa4129f46d1317cfc5022f.tar.gz |
(shrink-window-if-larger-than-buffer) Added doc string. Made argument
optional, because window-buffer does the right thing with nil.
Diffstat (limited to 'lisp/electric.el')
-rw-r--r-- | lisp/electric.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/electric.el b/lisp/electric.el index 5272d706845..dbb19946d6b 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -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 |