aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMartin Rudalics2015-02-01 12:00:14 -0800
committerPaul Eggert2015-02-01 12:06:32 -0800
commit92a8dec54ed3314ca06f40cd0c226c4267a160e8 (patch)
tree2849adeaa9595366b537997ed06243816dba01d3 /doc
parent241260cc2819e5df254ad85953588b06388ade61 (diff)
downloademacs-92a8dec54ed3314ca06f40cd0c226c4267a160e8.tar.gz
emacs-92a8dec54ed3314ca06f40cd0c226c4267a160e8.zip
Give `window-text-pixel-size' optional BUFFER argument.
[This reinstalls commit 1d1162479caf1fdf48564f1486fa84e3cdacaa9b, which I mistakenly reverted. --eggert] * xdisp.c (Fwindow_text_pixel_size): Add optional argument BUFFER. * display.texi (Size of Displayed Text): Describe optional argument BUFFER of `window-text-pixel-size'.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/display.texi9
2 files changed, 13 insertions, 1 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 2cde2fb6f48..aa4d3200830 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12015-02-01 Martin Rudalics <rudalics@gmx.at>
2
3 * display.texi (Size of Displayed Text): Describe optional
4 argument BUFFER of `window-text-pixel-size'.
5
12015-01-28 Eli Zaretskii <eliz@gnu.org> 62015-01-28 Eli Zaretskii <eliz@gnu.org>
2 7
3 * searching.texi (Regexp Search): Add a cross-reference to "Syntax 8 * searching.texi (Regexp Search): Add a cross-reference to "Syntax
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index b09b82a6724..10b17a3f389 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -1880,7 +1880,7 @@ displayed in a given window. This function is used by
1880@code{fit-frame-to-buffer} (@pxref{Size and Position}) to make a window 1880@code{fit-frame-to-buffer} (@pxref{Size and Position}) to make a window
1881exactly as large as the text it contains. 1881exactly as large as the text it contains.
1882 1882
1883@defun window-text-pixel-size &optional window from to x-limit y-limit mode-and-header-line 1883@defun window-text-pixel-size &optional window from to x-limit y-limit mode-and-header-line buffer
1884This function returns the size of the text of @var{window}'s buffer in 1884This function returns the size of the text of @var{window}'s buffer in
1885pixels. @var{window} must be a live window and defaults to the selected 1885pixels. @var{window} must be a live window and defaults to the selected
1886one. The return value is a cons of the maximum pixel-width of any text 1886one. The return value is a cons of the maximum pixel-width of any text
@@ -1919,6 +1919,13 @@ means to not include the height of the mode- or header-line of
1919@code{mode-line} or @code{header-line}, include only the height of that 1919@code{mode-line} or @code{header-line}, include only the height of that
1920line, if present, in the return value. If it is @code{t}, include the 1920line, if present, in the return value. If it is @code{t}, include the
1921height of both, if present, in the return value. 1921height of both, if present, in the return value.
1922
1923The optional argument @var{buffer} allows to specify an alternate buffer
1924whose text size will be calculated. If @var{buffer} is @code{nil} or
1925omitted, then operate on the buffer of @var{window}. If it is @code{t},
1926then operate on the current buffer as if it were displayed in
1927@var{window}. If it specifies a live buffer, then operate on that
1928buffer as if it were displayed in @var{window}.
1922@end defun 1929@end defun
1923 1930
1924 1931