Mercurial > hg > xemacs-beta
comparison lisp/help.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 | e7b3a3266356 |
children | 69a1eda3da06 |
comparison
equal
deleted
inserted
replaced
4504:b82fdf7305ee | 4506:bd28481bb0e1 |
---|---|
1876 (if (and-fboundp #'find-variable e) | 1876 (if (and-fboundp #'find-variable e) |
1877 (with-fboundp #'find-variable | 1877 (with-fboundp #'find-variable |
1878 (find-variable (extent-property e 'find-variable-symbol))) | 1878 (find-variable (extent-property e 'find-variable-symbol))) |
1879 (mouse-track event))))) | 1879 (mouse-track event))))) |
1880 | 1880 |
1881 (define-minor-mode temp-buffer-resize-mode | |
1882 "Toggle the mode which makes windows smaller for temporary buffers. | |
1883 With prefix argument ARG, turn the resizing of windows displaying temporary | |
1884 buffers on if ARG is positive or off otherwise. | |
1885 This makes the window the right height for its contents, but never | |
1886 less than `window-min-height' nor a higher proportion of its frame than | |
1887 `temp-buffer-max-height'. (Note the differing semantics of the latter | |
1888 versus GNU Emacs, where `temp-buffer-max-height' is an integer number of | |
1889 lines.) | |
1890 This applies to `help', `apropos' and `completion' buffers, and some others." | |
1891 :global t :group 'help | |
1892 ;; XEmacs; our implementation of this is very different. | |
1893 (setq temp-buffer-shrink-to-fit temp-buffer-resize-mode)) | |
1894 | |
1895 ;; GNU name for this function. | |
1896 (defalias 'resize-temp-buffer-window 'shrink-window-if-larger-than-buffer) | |
1897 | |
1881 ;;; help.el ends here | 1898 ;;; help.el ends here |