diff options
| author | Kenichi Handa | 2000-11-16 06:33:25 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2000-11-16 06:33:25 +0000 |
| commit | edb08287fbcf863b53bd55cba3f39b7430a8b43c (patch) | |
| tree | 5074acfef65caa931665b50f7584b7ff29089b70 | |
| parent | b1491763bb730b84c0d8a846908a9d241921e061 (diff) | |
| download | emacs-edb08287fbcf863b53bd55cba3f39b7430a8b43c.tar.gz emacs-edb08287fbcf863b53bd55cba3f39b7430a8b43c.zip | |
(fit-window-to-buffer): Fix previous change.
| -rw-r--r-- | lisp/window.el | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lisp/window.el b/lisp/window.el index 59c946ee685..8d646ca3113 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -500,13 +500,11 @@ header-line." | |||
| 500 | (1- (point)) | 500 | (1- (point)) |
| 501 | (point)))))) | 501 | (point)))))) |
| 502 | (set-window-vscroll window 0) | 502 | (set-window-vscroll window 0) |
| 503 | (prog1 | ||
| 504 | (list desired-height max-height) | ||
| 505 | (while (and (< desired-height max-height) | 503 | (while (and (< desired-height max-height) |
| 506 | (= desired-height (window-height window)) | 504 | (= desired-height (window-height window)) |
| 507 | (not (pos-visible-in-window-p end window t))) | 505 | (not (pos-visible-in-window-p end window t))) |
| 508 | (enlarge-window 1) | 506 | (enlarge-window 1) |
| 509 | (setq desired-height (1+ desired-height)))))))) | 507 | (setq desired-height (1+ desired-height))))))) |
| 510 | 508 | ||
| 511 | (defun shrink-window-if-larger-than-buffer (&optional window) | 509 | (defun shrink-window-if-larger-than-buffer (&optional window) |
| 512 | "Shrink the WINDOW to be as small as possible to display its contents. | 510 | "Shrink the WINDOW to be as small as possible to display its contents. |