diff options
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 29 |
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 | ||
| 657 | DEFUN ("window-body-size", Fwindow_body_size, Swindow_body_size, 0, 2, 0, | 657 | DEFUN ("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. |
| 659 | WINDOW must be a live window and defaults to the selected one. The | 659 | WINDOW must be a live window and defaults to the selected one. |
| 660 | return value does not include WINDOW's mode line and header line, if | 660 | |
| 661 | any. | 661 | If the optional argument HORIZONTAL is omitted or nil, the function |
| 662 | 662 | returns the number of WINDOW's lines, excluding the mode line and | |
| 663 | Optional argument HORIZONTAL non-nil means return the number of columns | 663 | header line, if any. |
| 664 | of WINDOW's body. In this case, the return value does not include any | 664 | |
| 665 | vertical dividers or scroll bars owned by WINDOW. On a window-system | 665 | If HORIZONTAL is non-nil, the function returns the number of columns |
| 666 | the return value does not include the number of columns used for | 666 | excluding any vertical dividers or scroll bars owned by WINDOW. On a |
| 667 | WINDOW's fringes or display margins either. */) | 667 | window-system the return value also excludes the number of columns |
| 668 | used for WINDOW's fringes or display margins. | ||
| 669 | |||
| 670 | Note that the return value is measured in canonical units, i.e. for | ||
| 671 | the default frame's face. If the window shows some characters with | ||
| 672 | non-default face, e.g., if the font of some characters is larger or | ||
| 673 | smaller than the default font, the value returned by this function | ||
| 674 | will not match the actual number of lines or characters per line | ||
| 675 | shown in the window. To get the actual number of columns and lines, | ||
| 676 | use `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); |