diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xdisp.c | 35 |
2 files changed, 15 insertions, 25 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6b56abbafd1..2c9b6c8375b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2015-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 | |||
| 1 | 2015-02-04 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2015-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 | ||
| 9653 | DEFUN ("window-text-pixel-size", Fwindow_text_pixel_size, Swindow_text_pixel_size, 0, 7, 0, | 9653 | DEFUN ("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. |
| 9655 | WINDOW must be a live window and defaults to the selected one. The | 9655 | WINDOW must be a live window and defaults to the selected one. The |
| 9656 | return value is a cons of the maximum pixel-width of any text line and | 9656 | return 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 | |||
| 9683 | include the height of the mode- or header-line of WINDOW in the return | 9683 | include the height of the mode- or header-line of WINDOW in the return |
| 9684 | value. If it is either the symbol `mode-line' or `header-line', include | 9684 | value. If it is either the symbol `mode-line' or `header-line', include |
| 9685 | only the height of that line, if present, in the return value. If t, | 9685 | only the height of that line, if present, in the return value. If t, |
| 9686 | include the height of both, if present, in the return value. | 9686 | include the height of both, if present, in the return value. */) |
| 9687 | |||
| 9688 | Optional argument BUFFER nil means to return the size of the text of | ||
| 9689 | WINDOW's buffer. BUFFER t means to return the size of the text of the | ||
| 9690 | current buffer as if it were displayed in WINDOW. Else BUFFER has to | ||
| 9691 | specify a live buffer and this function returns the size of the text of | ||
| 9692 | BUFFER 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)) |