aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2011-11-04 12:09:41 +0200
committerEli Zaretskii2011-11-04 12:09:41 +0200
commit89bd5ee15acb93aefd403f3c76d1aff57520608b (patch)
treef0b75789124fd62789f8642eec80b97c82c01fe1 /src
parent56c31147dce7a3b3c40792be5b115a2e6dbcfe1d (diff)
downloademacs-89bd5ee15acb93aefd403f3c76d1aff57520608b.tar.gz
emacs-89bd5ee15acb93aefd403f3c76d1aff57520608b.zip
Fix documentation per bug #9949.
src/window.c (Fwindow_body_size): Mention in the doc string that the return value is in frame's canonical units. lisp/window.el (window-body-height, window-body-width): Mention in the doc string that the return values are in frame's canonical units. doc/lispref/windows.texi (Window Sizes): Mention in the doc string that the return values of `window-body-height' and `window-body-width' are in frame's canonical units.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/window.c29
2 files changed, 24 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f198f37d0c1..ccfcb48daf0 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12011-11-04 Eli Zaretskii <eliz@gnu.org>
2
3 * window.c (Fwindow_body_size): Mention in the doc string that the
4 return value is in frame's canonical units. (Bug#9949)
5
12011-11-03 Eli Zaretskii <eliz@gnu.org> 62011-11-03 Eli Zaretskii <eliz@gnu.org>
2 7
3 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947) 8 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
diff --git a/src/window.c b/src/window.c
index 422073b1bd3..6b3b7f2a471 100644
--- a/src/window.c
+++ b/src/window.c
@@ -653,16 +653,25 @@ window_body_cols (struct window *w)
653} 653}
654 654
655DEFUN ("window-body-size", Fwindow_body_size, Swindow_body_size, 0, 2, 0, 655DEFUN ("window-body-size", Fwindow_body_size, Swindow_body_size, 0, 2, 0,
656 doc: /* Return the number of lines of WINDOW's body. 656 doc: /* Return the number of lines or columns of WINDOW's body.
657WINDOW must be a live window and defaults to the selected one. The 657WINDOW must be a live window and defaults to the selected one.
658return value does not include WINDOW's mode line and header line, if 658
659any. 659If the optional argument HORIZONTAL is omitted or nil, the function
660 660returns the number of WINDOW's lines, excluding the mode line and
661Optional argument HORIZONTAL non-nil means return the number of columns 661header line, if any.
662of WINDOW's body. In this case, the return value does not include any 662
663vertical dividers or scroll bars owned by WINDOW. On a window-system 663If HORIZONTAL is non-nil, the function returns the number of columns
664the return value does not include the number of columns used for 664excluding any vertical dividers or scroll bars owned by WINDOW. On a
665WINDOW's fringes or display margins either. */) 665window-system the return value also excludes the number of columns
666used for WINDOW's fringes or display margins.
667
668Note that the return value is measured in canonical units, i.e. for
669the default frame's face. If the window shows some characters with
670non-default face, e.g., if the font of some characters is larger or
671smaller than the default font, the value returned by this function
672will not match the actual number of lines or characters per line
673shown in the window. To get the actual number of columns and lines,
674use `posn-at-point'. */)
666 (Lisp_Object window, Lisp_Object horizontal) 675 (Lisp_Object window, Lisp_Object horizontal)
667{ 676{
668 struct window *w = decode_any_window (window); 677 struct window *w = decode_any_window (window);