comparison lisp/frame.el @ 4506:bd28481bb0e1

Port #'window-buffer-height, #'fit-window-to-buffer, & window, buf, functions. lisp/ChangeLog addition: 2008-08-31 Aidan Kehoe <kehoea@parhasard.net> * window.el (only-window-p): New. Check if WINDOW is the only window in some context, normally its frame. (one-window-p): Implemented this in terms of #'only-window-p, calling it on the selected window. (window-buffer-height): Uncomment this, make it work. (count-screen-lines): Support a BUFFER argument. (fit-window-to-buffer): Uncomment this, correct its implementation to work with XEmacs. * help.el (temp-buffer-resize-mode): New. Name taken from GNU, implementation our own. * (resize-temp-buffer-window): New. GNU-compatible alias for #'shrink-window-if-larger-than-buffer. * dumped-lisp.el (preloaded-file-list): Move easy-mmode before help, now that the latter uses #'define-minor-mode. * frame.el: Point to #'temp-buffer-resize-mode in a comment. Some of this code is from GNU; help.el CVS version 1.327 of 2007-03-21, window.el CVS version 1.122, of 2007-06-24. Both these are GPLV2 or later.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 31 Aug 2008 12:26:46 +0200
parents e3cad3fd1be4
children 44129f301385
comparison
equal deleted inserted replaced
4504:b82fdf7305ee 4506:bd28481bb0e1
1848 (defcustom temp-buffer-max-height .5 1848 (defcustom temp-buffer-max-height .5
1849 "*Proportion of frame to use for temp windows." 1849 "*Proportion of frame to use for temp windows."
1850 :type 'number 1850 :type 'number
1851 :group 'frames) 1851 :group 'frames)
1852 1852
1853 ;; See also #'temp-buffer-resize-mode in help.el.
1854
1853 (defun show-temp-buffer-in-current-frame (buffer) 1855 (defun show-temp-buffer-in-current-frame (buffer)
1854 "For use as the value of `temp-buffer-show-function': 1856 "For use as the value of `temp-buffer-show-function':
1855 always displays the buffer in the selected frame, regardless of the behavior 1857 always displays the buffer in the selected frame, regardless of the behavior
1856 that would otherwise be introduced by the `pre-display-buffer-function', which 1858 that would otherwise be introduced by the `pre-display-buffer-function', which
1857 is normally set to `get-frame-for-buffer' (which see)." 1859 is normally set to `get-frame-for-buffer' (which see)."