diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/window.el | 18 |
2 files changed, 22 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6352a65e4fc..eb276721dbc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2011-11-04 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * window.el (window-body-height, window-body-width): Mention in | ||
| 4 | the doc string that the return values are in frame's canonical | ||
| 5 | units. (Bug#9949) | ||
| 6 | |||
| 1 | 2011-11-03 Alan Mackenzie <acm@muc.de> | 7 | 2011-11-03 Alan Mackenzie <acm@muc.de> |
| 2 | 8 | ||
| 3 | * progmodes/cc-langs.el (c-nonlabel-token-2-key): New variable for | 9 | * progmodes/cc-langs.el (c-nonlabel-token-2-key): New variable for |
diff --git a/lisp/window.el b/lisp/window.el index 9b12c204d48..d6ab5e0e6cc 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -972,7 +972,14 @@ The return value does not include WINDOW's mode line and header | |||
| 972 | line, if any. If a line at the bottom of the window is only | 972 | line, if any. If a line at the bottom of the window is only |
| 973 | partially visible, that line is included in the return value. If | 973 | partially visible, that line is included in the return value. If |
| 974 | you do not want to include a partially visible bottom line in the | 974 | you do not want to include a partially visible bottom line in the |
| 975 | return value, use `window-text-height' instead." | 975 | return value, use `window-text-height' instead. |
| 976 | |||
| 977 | Note that the return value is measured in canonical units, i.e. for | ||
| 978 | the default frame's face. If the window shows some characters with | ||
| 979 | non-default face, e.g., if the font of some characters is larger or | ||
| 980 | smaller than the default font, the value returned by this function | ||
| 981 | will not match the actual number of lines shown in the window. To | ||
| 982 | get the actual number of lines, use `posn-at-point'." | ||
| 976 | (window-body-size window)) | 983 | (window-body-size window)) |
| 977 | 984 | ||
| 978 | (defsubst window-body-width (&optional window) | 985 | (defsubst window-body-width (&optional window) |
| @@ -982,7 +989,14 @@ WINDOW must be a live window and defaults to the selected one. | |||
| 982 | The return value does not include any vertical dividers or scroll | 989 | The return value does not include any vertical dividers or scroll |
| 983 | bars owned by WINDOW. On a window-system the return value does | 990 | bars owned by WINDOW. On a window-system the return value does |
| 984 | not include the number of columns used for WINDOW's fringes or | 991 | not include the number of columns used for WINDOW's fringes or |
| 985 | display margins either." | 992 | display margins either. |
| 993 | |||
| 994 | Note that the return value is measured in canonical units, i.e. for | ||
| 995 | the default frame's face. If the window shows some characters with | ||
| 996 | non-default face, e.g., if the font of some characters is larger or | ||
| 997 | smaller than the default font, the value returned by this function | ||
| 998 | will not match the actual number of characters per line shown in the | ||
| 999 | window. To get the actual number of columns, use `posn-at-point'." | ||
| 986 | (window-body-size window t)) | 1000 | (window-body-size window t)) |
| 987 | 1001 | ||
| 988 | ;; Eventually we should make `window-height' obsolete. | 1002 | ;; Eventually we should make `window-height' obsolete. |