aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorJoakim Verona2011-11-04 13:06:17 +0100
committerJoakim Verona2011-11-04 13:06:17 +0100
commitc823c667cd00b9d8036ce06b943f58f3f4efd7d9 (patch)
tree44cba3ad000f3f99215f7d742a9dc579516c4fe3 /src/window.c
parent19e28bef7fdd7e74084b5ace141e067b491b50fd (diff)
parent89bd5ee15acb93aefd403f3c76d1aff57520608b (diff)
downloademacs-c823c667cd00b9d8036ce06b943f58f3f4efd7d9.tar.gz
emacs-c823c667cd00b9d8036ce06b943f58f3f4efd7d9.zip
upstream
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/window.c b/src/window.c
index 056da1512da..496a4e6c6ea 100644
--- a/src/window.c
+++ b/src/window.c
@@ -655,16 +655,25 @@ window_body_cols (struct window *w)
655} 655}
656 656
657DEFUN ("window-body-size", Fwindow_body_size, Swindow_body_size, 0, 2, 0, 657DEFUN ("window-body-size", Fwindow_body_size, Swindow_body_size, 0, 2, 0,
658 doc: /* Return the number of lines of WINDOW's body. 658 doc: /* Return the number of lines or columns of WINDOW's body.
659WINDOW must be a live window and defaults to the selected one. The 659WINDOW must be a live window and defaults to the selected one.
660return value does not include WINDOW's mode line and header line, if 660
661any. 661If the optional argument HORIZONTAL is omitted or nil, the function
662 662returns the number of WINDOW's lines, excluding the mode line and
663Optional argument HORIZONTAL non-nil means return the number of columns 663header line, if any.
664of WINDOW's body. In this case, the return value does not include any 664
665vertical dividers or scroll bars owned by WINDOW. On a window-system 665If HORIZONTAL is non-nil, the function returns the number of columns
666the return value does not include the number of columns used for 666excluding any vertical dividers or scroll bars owned by WINDOW. On a
667WINDOW's fringes or display margins either. */) 667window-system the return value also excludes the number of columns
668used for WINDOW's fringes or display margins.
669
670Note that the return value is measured in canonical units, i.e. for
671the default frame's face. If the window shows some characters with
672non-default face, e.g., if the font of some characters is larger or
673smaller than the default font, the value returned by this function
674will not match the actual number of lines or characters per line
675shown in the window. To get the actual number of columns and lines,
676use `posn-at-point'. */)
668 (Lisp_Object window, Lisp_Object horizontal) 677 (Lisp_Object window, Lisp_Object horizontal)
669{ 678{
670 struct window *w = decode_any_window (window); 679 struct window *w = decode_any_window (window);