diff options
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 |