comparison lisp/help.el @ 91005:424b655804ca

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 846-851) - Update from CVS - Merge from emacs--rel--22 * emacs--rel--22 (patch 88-92) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 242-244) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-246
author Miles Bader <miles@gnu.org>
date Mon, 13 Aug 2007 13:48:35 +0000
parents f55f9811f5d7 c43bd3dbaa93
children 14c4a6aac623
comparison
equal deleted inserted replaced
91004:f72cf5b2ab11 91005:424b655804ca
956 ;; text size, so `resize-temp-buffer-window' must be run *after* it. 956 ;; text size, so `resize-temp-buffer-window' must be run *after* it.
957 (add-hook 'temp-buffer-show-hook 'resize-temp-buffer-window 'append) 957 (add-hook 'temp-buffer-show-hook 'resize-temp-buffer-window 'append)
958 (remove-hook 'temp-buffer-show-hook 'resize-temp-buffer-window))) 958 (remove-hook 'temp-buffer-show-hook 'resize-temp-buffer-window)))
959 959
960 (defun resize-temp-buffer-window () 960 (defun resize-temp-buffer-window ()
961 "Resize the current window to fit its contents. 961 "Resize the selected window to fit its contents.
962 Will not make it higher than `temp-buffer-max-height' nor smaller than 962 Will not make it higher than `temp-buffer-max-height' nor smaller than
963 `window-min-height'. Do nothing if it is the only window on its frame, if it 963 `window-min-height'. Do nothing if it is the only window on its frame, if it
964 is not as wide as the frame or if some of the window's contents are scrolled 964 is not as wide as the frame or if some of the window's contents are scrolled
965 out of view." 965 out of view."
966 (unless (or (one-window-p 'nomini) 966 (unless (or (one-window-p 'nomini)
967 (not (pos-visible-in-window-p (point-min))) 967 (not (pos-visible-in-window-p (point-min)))
968 (/= (frame-width) (window-width))) 968 (not (window-full-width-p)))
969 (fit-window-to-buffer 969 (fit-window-to-buffer
970 (selected-window) 970 (selected-window)
971 (if (functionp temp-buffer-max-height) 971 (if (functionp temp-buffer-max-height)
972 (funcall temp-buffer-max-height (current-buffer)) 972 (funcall temp-buffer-max-height (current-buffer))
973 temp-buffer-max-height)))) 973 temp-buffer-max-height))))