aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Rudalics2015-02-05 15:40:19 +0100
committerMartin Rudalics2015-02-05 15:40:19 +0100
commit49aa3a12ccf0ceea3961edaec9cd00dc6038fc79 (patch)
treecded08e9273f9497848d988ecaf5fcd601ff1c97
parentff7072d5314768e31a4f15ad1ce0039405ddb535 (diff)
downloademacs-49aa3a12ccf0ceea3961edaec9cd00dc6038fc79.tar.gz
emacs-49aa3a12ccf0ceea3961edaec9cd00dc6038fc79.zip
Remove recently added BUFFER arg of `window-text-pixel-size'.
* xdisp.c (Fwindow_text_pixel_size): Remove optional BUFFER argument added on 2015-02-01. * display.texi (Size of Displayed Text): Remove description of optional argument BUFFER of `window-text-pixel-size'.
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/display.texi9
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c35
4 files changed, 21 insertions, 33 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index aa4d3200830..e928d19c813 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12015-02-05 Martin Rudalics <rudalics@gmx.at>
2
3 * display.texi (Size of Displayed Text): Remove description of
4 optional argument BUFFER of `window-text-pixel-size'.
5
12015-02-01 Martin Rudalics <rudalics@gmx.at> 62015-02-01 Martin Rudalics <rudalics@gmx.at>
2 7
3 * display.texi (Size of Displayed Text): Describe optional 8 * display.texi (Size of Displayed Text): Describe optional
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 10b17a3f389..b09b82a6724 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 buffer 1883@defun window-text-pixel-size &optional window from to x-limit y-limit mode-and-header-line
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,13 +1919,6 @@ 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}.
1929@end defun 1922@end defun
1930 1923
1931 1924
diff --git a/src/ChangeLog b/src/ChangeLog
index 6b56abbafd1..2c9b6c8375b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12015-02-05 Martin Rudalics <rudalics@gmx.at>
2
3 * xdisp.c (Fwindow_text_pixel_size): Remove optional BUFFER
4 argument added on 2015-02-01.
5
12015-02-04 Paul Eggert <eggert@cs.ucla.edu> 62015-02-04 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 Remove no-longer-used two_byte_p calculations 8 Remove no-longer-used two_byte_p calculations
diff --git a/src/xdisp.c b/src/xdisp.c
index 3c928f7897a..5c3e641fdfe 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -9650,7 +9650,7 @@ in_display_vector_p (struct it *it)
9650 && it->dpvec + it->current.dpvec_index != it->dpend); 9650 && it->dpvec + it->current.dpvec_index != it->dpend);
9651} 9651}
9652 9652
9653DEFUN ("window-text-pixel-size", Fwindow_text_pixel_size, Swindow_text_pixel_size, 0, 7, 0, 9653DEFUN ("window-text-pixel-size", Fwindow_text_pixel_size, Swindow_text_pixel_size, 0, 6, 0,
9654 doc: /* Return the size of the text of WINDOW's buffer in pixels. 9654 doc: /* Return the size of the text of WINDOW's buffer in pixels.
9655WINDOW must be a live window and defaults to the selected one. The 9655WINDOW must be a live window and defaults to the selected one. The
9656return value is a cons of the maximum pixel-width of any text line and 9656return value is a cons of the maximum pixel-width of any text line and
@@ -9683,17 +9683,12 @@ Optional argument MODE-AND-HEADER-LINE nil or omitted means do not
9683include the height of the mode- or header-line of WINDOW in the return 9683include the height of the mode- or header-line of WINDOW in the return
9684value. If it is either the symbol `mode-line' or `header-line', include 9684value. If it is either the symbol `mode-line' or `header-line', include
9685only the height of that line, if present, in the return value. If t, 9685only the height of that line, if present, in the return value. If t,
9686include the height of both, if present, in the return value. 9686include the height of both, if present, in the return value. */)
9687
9688Optional argument BUFFER nil means to return the size of the text of
9689WINDOW's buffer. BUFFER t means to return the size of the text of the
9690current buffer as if it were displayed in WINDOW. Else BUFFER has to
9691specify a live buffer and this function returns the size of the text of
9692BUFFER as if it were displayed in WINDOW. */)
9693 (Lisp_Object window, Lisp_Object from, Lisp_Object to, Lisp_Object x_limit, 9687 (Lisp_Object window, Lisp_Object from, Lisp_Object to, Lisp_Object x_limit,
9694 Lisp_Object y_limit, Lisp_Object mode_and_header_line, Lisp_Object buffer) 9688 Lisp_Object y_limit, Lisp_Object mode_and_header_line)
9695{ 9689{
9696 struct window *w = decode_live_window (window); 9690 struct window *w = decode_live_window (window);
9691 Lisp_Object buffer = w->contents;
9697 struct buffer *b; 9692 struct buffer *b;
9698 struct it it; 9693 struct it it;
9699 struct buffer *old_b = NULL; 9694 struct buffer *old_b = NULL;
@@ -9702,23 +9697,13 @@ BUFFER as if it were displayed in WINDOW. */)
9702 void *itdata = NULL; 9697 void *itdata = NULL;
9703 int c, max_y = -1, x = 0, y = 0; 9698 int c, max_y = -1, x = 0, y = 0;
9704 9699
9705 if (EQ (buffer, Qt)) 9700 CHECK_BUFFER (buffer);
9706 b = current_buffer; 9701 b = XBUFFER (buffer);
9707 else
9708 {
9709 if (NILP (buffer))
9710 buffer = w->contents;
9711
9712 CHECK_BUFFER (buffer);
9713 if (!BUFFER_LIVE_P (XBUFFER (buffer)))
9714 error ("Not a live buffer");
9715 9702
9716 b = XBUFFER (buffer); 9703 if (b != current_buffer)
9717 if (b != current_buffer) 9704 {
9718 { 9705 old_b = current_buffer;
9719 old_b = current_buffer; 9706 set_buffer_internal (b);
9720 set_buffer_internal (b);
9721 }
9722 } 9707 }
9723 9708
9724 if (NILP (from)) 9709 if (NILP (from))