aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXue Fuqiao2014-02-27 22:10:55 +0800
committerXue Fuqiao2014-02-27 22:10:55 +0800
commiteed1c3990176addda8eb4deed826d1d12fb54dee (patch)
tree74b92d9f0f0c2551f84e6471c6e145c0261d8983
parentde37b1f449795b9c61c3e8212b698e1ec7482223 (diff)
parent8603bdb3b7ab4c4faa10ddadcdc2708228717220 (diff)
downloademacs-eed1c3990176addda8eb4deed826d1d12fb54dee.tar.gz
emacs-eed1c3990176addda8eb4deed826d1d12fb54dee.zip
Document some changes about windows.
* doc/lispref/windows.texi (Window Sizes): Document `window-size'. (Display Action Functions): Document `display-buffer-at-bottom'. (Window Configurations): Minor fixes. * doc/lispref/modes.texi (Header Lines): Document `window-header-line-height'. * doc/lispref/display.texi (Scroll Bars): Document `window-scroll-bar-width'. * etc/NEWS: Related markup.
-rw-r--r--doc/lispref/ChangeLog8
-rw-r--r--doc/lispref/display.texi6
-rw-r--r--doc/lispref/modes.texi9
-rw-r--r--doc/lispref/windows.texi35
-rw-r--r--etc/NEWS4
5 files changed, 58 insertions, 4 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 0d0f787eb27..f32f88c18ae 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,5 +1,13 @@
12014-02-27 Xue Fuqiao <xfq@gnu.org> 12014-02-27 Xue Fuqiao <xfq@gnu.org>
2 2
3 * windows.texi (Window Sizes): Document `window-size'.
4 (Display Action Functions): Document `display-buffer-at-bottom'.
5 (Window Configurations): Minor fixes.
6
7 * modes.texi (Header Lines): Document `window-header-line-height'.
8
9 * display.texi (Scroll Bars): Document `window-scroll-bar-width'.
10
3 * windows.texi (Window Sizes, Resizing Windows): Document some 11 * windows.texi (Window Sizes, Resizing Windows): Document some
4 pixelwise window operations. 12 pixelwise window operations.
5 13
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 519d33f5844..496fbf87041 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -3849,6 +3849,12 @@ bar actually occupies.
3849@var{horizontal-type} is not actually meaningful. 3849@var{horizontal-type} is not actually meaningful.
3850@end defun 3850@end defun
3851 3851
3852@defun window-scroll-bar-width &optional window
3853This function returns the width of @var{window}'s vertical scrollbar,
3854in pixels. @var{window} must be a live window. If @var{window} is
3855@code{nil} or omitted, it will be the selected window.
3856@end defun
3857
3852If you don't specify these values for a window with 3858If you don't specify these values for a window with
3853@code{set-window-scroll-bars}, the buffer-local variables 3859@code{set-window-scroll-bars}, the buffer-local variables
3854@code{scroll-bar-mode} and @code{scroll-bar-width} in the buffer being 3860@code{scroll-bar-mode} and @code{scroll-bar-width} in the buffer being
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index df0dd1a58e0..e12d00a5b59 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -2221,6 +2221,15 @@ is the same as for @code{mode-line-format} (@pxref{Mode Line Data}).
2221It is normally @code{nil}, so that ordinary buffers have no header line. 2221It is normally @code{nil}, so that ordinary buffers have no header line.
2222@end defvar 2222@end defvar
2223 2223
2224The function @code{window-header-line-height} returns the height of
2225the header line:
2226
2227@defun window-header-line-height &optional window
2228Return the height of @var{window}'s header line, in pixels.
2229@var{window} must be a live window. If @var{window} is @code{nil} or
2230omitted, it will be the selected window.
2231@end defun
2232
2224 A window that is just one line tall never displays a header line. A 2233 A window that is just one line tall never displays a header line. A
2225window that is two lines tall cannot display both a mode line and a 2234window that is two lines tall cannot display both a mode line and a
2226header line at once; if it has a mode line, then it does not display a 2235header line at once; if it has a mode line, then it does not display a
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 08d82f57a93..ea7856d6f7f 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -413,6 +413,22 @@ default font. Thus, if a window is displaying text with a different
413font or size, the reported height and width for that window may differ 413font or size, the reported height and width for that window may differ
414from the actual number of text lines or columns displayed within it. 414from the actual number of text lines or columns displayed within it.
415 415
416@defun window-size &optional window horizontal pixelwise round
417This function returns the height or width of @var{window}.
418@var{window} must be a valid window. The default value of
419@var{window} is the selected window.
420
421If @var{horizontal} is omitted or nil, return the total height of
422@var{window}, in lines; otherwise return the total width in columns.
423
424The optional argument @var{pixelwise} means return size of
425@var{window}, in pixels.
426
427The optional argument @var{round} is ignored if @var{pixelwise} is
428non-@code{nil}. Otherwise it is handled as for
429@code{window-total-height} and @code{window-total-width}.
430@end defun
431
416@cindex window height 432@cindex window height
417@cindex height of a window 433@cindex height of a window
418@cindex total height of a window 434@cindex total height of a window
@@ -2078,6 +2094,15 @@ specified by that entry will override any other window found by the
2078methods above, even if that window never showed @var{buffer} before. 2094methods above, even if that window never showed @var{buffer} before.
2079@end defun 2095@end defun
2080 2096
2097@defun display-buffer-at-bottom buffer alist
2098This function tries to display @var{buffer} in a window at the bottom
2099of the selected frame.
2100
2101This either splits the window at the bottom of the frame or the
2102frame's root window, or reuses an existing window at the bottom of the
2103selected frame.
2104@end defun
2105
2081@defun display-buffer-use-some-window buffer alist 2106@defun display-buffer-use-some-window buffer alist
2082This function tries to display @var{buffer} by choosing an existing 2107This function tries to display @var{buffer} by choosing an existing
2083window and displaying the buffer in that window. It can fail if all 2108window and displaying the buffer in that window. It can fail if all
@@ -3533,6 +3558,7 @@ to clone the state of a frame into an arbitrary live window
3533(@code{set-window-configuration} effectively clones the windows of a 3558(@code{set-window-configuration} effectively clones the windows of a
3534frame into the root window of that very frame only). 3559frame into the root window of that very frame only).
3535 3560
3561@cindex window state
3536@defun window-state-get &optional window writable 3562@defun window-state-get &optional window writable
3537This function returns the state of @var{window} as a Lisp object. The 3563This function returns the state of @var{window} as a Lisp object. The
3538argument @var{window} must be a valid window and defaults to the root 3564argument @var{window} must be a valid window and defaults to the root
@@ -3554,10 +3580,11 @@ written to disk and read back in another session. In either case, use
3554the following function to restore the state of the window. 3580the following function to restore the state of the window.
3555 3581
3556@defun window-state-put state &optional window ignore 3582@defun window-state-put state &optional window ignore
3557This function puts the window state @var{state} into @var{window}. The 3583This function puts the window state @var{state} into @var{window}.
3558argument @var{state} should be the state of a window returned by an 3584The argument @var{state} should be the state of a window returned by
3559earlier invocation of @code{window-state-get}, see above. The optional 3585an earlier invocation of @code{window-state-get}, see above. The
3560argument @var{window} must specify a valid window and defaults to the 3586optional argument @var{window} can be either a live window or an
3587internal window (@pxref{Windows and Frames}) and defaults to the
3561selected one. If @var{window} is not live, it is replaced by a live 3588selected one. If @var{window} is not live, it is replaced by a live
3562window before putting @var{state} into it. 3589window before putting @var{state} into it.
3563 3590
diff --git a/etc/NEWS b/etc/NEWS
index fd2f380944a..da19f9c534b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -254,9 +254,11 @@ As a command, it was a special case of `C-x 2' (`split-window-below'),
254and as such superfluous. After being reimplemented in Lisp, its 254and as such superfluous. After being reimplemented in Lisp, its
255interactive form was mistakenly retained. 255interactive form was mistakenly retained.
256 256
257+++
257*** The functions `window-size' and `window-total-size' now have an 258*** The functions `window-size' and `window-total-size' now have an
258optional argument to return a rounded size value. 259optional argument to return a rounded size value.
259 260
261+++
260*** `window-state-put' now allows to put a window state into internal 262*** `window-state-put' now allows to put a window state into internal
261windows too. 263windows too.
262 264
@@ -266,10 +268,12 @@ Available only on X, this option allows to control over-scrolling
266using the scroll bar (i.e. dragging the thumb down even when the end 268using the scroll bar (i.e. dragging the thumb down even when the end
267of the buffer is visible). 269of the buffer is visible).
268 270
271+++
269*** New basic action function `display-buffer-in-previous-window' has 272*** New basic action function `display-buffer-in-previous-window' has
270`display-buffer' display a buffer in a window previously showing that 273`display-buffer' display a buffer in a window previously showing that
271buffer. 274buffer.
272 275
276+++
273*** New basic action function `display-buffer-at-bottom' has 277*** New basic action function `display-buffer-at-bottom' has
274`display-buffer' choose or make a window at the bottom of the selected 278`display-buffer' choose or make a window at the bottom of the selected
275frame. 279frame.