Maintenance: Better implementation of `fit-window-to-buffer'.

This function now uses `window-full-width-p' to check if the window
has the full width.
This commit is contained in:
Carsten Dominik 2009-01-09 09:09:42 +01:00
parent be253653c4
commit 703be2056c
2 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2009-01-09 Carsten Dominik <carsten.dominik@gmail.com>
* org-compat.el (org-fit-window-to-buffer): Use
`window-full-width-p'.
* org-export-latex.el (org-export-latex-fixed-width): Enforce the
space after the colon in short examples.

View File

@ -157,7 +157,9 @@ WINDOW defaults to the selected window. MAX-HEIGHT and MIN-HEIGHT are
passed through to `fit-window-to-buffer'. If SHRINK-ONLY is set, call
`shrink-window-if-larger-than-buffer' instead, the hight limit are
ignored in this case."
(cond ((> (frame-width) (window-width window))
(cond ((if (fboundp 'window-full-width-p)
(window-full-width-p window)
(> (frame-width) (window-width window)))
;; do nothing if another window would suffer
)
((and (fboundp 'fit-window-to-buffer) (not shrink-only))