[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] shr-fontified a4d3110 4/7: Revert the window-text-pixel-si
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] shr-fontified a4d3110 4/7: Revert the window-text-pixel-size change from the trunk |
Date: |
Sat, 07 Feb 2015 04:09:52 +0000 |
branch: shr-fontified
commit a4d31109134f9c5b9bd10fe1305586982468e2b8
Author: Lars Magne Ingebrigtsen <address@hidden>
Commit: Lars Magne Ingebrigtsen <address@hidden>
Revert the window-text-pixel-size change from the trunk
---
src/xdisp.c | 36 ++++++++++--------------------------
1 files changed, 10 insertions(+), 26 deletions(-)
diff --git a/src/xdisp.c b/src/xdisp.c
index 6fc3e2c..65696ef 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -9648,8 +9648,7 @@ in_display_vector_p (struct it *it)
&& it->current.dpvec_index > 0
&& it->dpvec + it->current.dpvec_index != it->dpend);
}
-
-DEFUN ("window-text-pixel-size", Fwindow_text_pixel_size,
Swindow_text_pixel_size, 0, 7, 0,
+DEFUN ("window-text-pixel-size", Fwindow_text_pixel_size,
Swindow_text_pixel_size, 0, 6, 0,
doc: /* Return the size of the text of WINDOW's buffer in pixels.
WINDOW must be a live window and defaults to the selected one. The
return value is a cons of the maximum pixel-width of any text line and
@@ -9682,17 +9681,12 @@ Optional argument MODE-AND-HEADER-LINE nil or omitted
means do not
include the height of the mode- or header-line of WINDOW in the return
value. If it is either the symbol `mode-line' or `header-line', include
only the height of that line, if present, in the return value. If t,
-include the height of both, if present, in the return value.
-
-Optional argument BUFFER nil means to return the size of the text of
-WINDOW's buffer. BUFFER t means to return the size of the text of the
-current buffer as if it were displayed in WINDOW. Else BUFFER has to
-specify a live buffer and this function returns the size of the text of
-BUFFER as if it were displayed in WINDOW. */)
+include the height of both, if present, in the return value. */)
(Lisp_Object window, Lisp_Object from, Lisp_Object to, Lisp_Object x_limit,
- Lisp_Object y_limit, Lisp_Object mode_and_header_line, Lisp_Object buffer)
+ Lisp_Object y_limit, Lisp_Object mode_and_header_line)
{
struct window *w = decode_live_window (window);
+ Lisp_Object buffer = w->contents;
struct buffer *b;
struct it it;
struct buffer *old_b = NULL;
@@ -9701,23 +9695,13 @@ BUFFER as if it were displayed in WINDOW. */)
void *itdata = NULL;
int c, max_y = -1, x = 0, y = 0;
- if (EQ (buffer, Qt))
- b = current_buffer;
- else
- {
- if (NILP (buffer))
- buffer = w->contents;
-
- CHECK_BUFFER (buffer);
- if (!BUFFER_LIVE_P (XBUFFER (buffer)))
- error ("Not a live buffer");
+ CHECK_BUFFER (buffer);
+ b = XBUFFER (buffer);
- b = XBUFFER (buffer);
- if (b != current_buffer)
- {
- old_b = current_buffer;
- set_buffer_internal (b);
- }
+ if (b != current_buffer)
+ {
+ old_b = current_buffer;
+ set_buffer_internal (b);
}
if (NILP (from))
- [Emacs-diffs] shr-fontified updated (3669977 -> ef5a49e), Lars Ingebrigtsen, 2015/02/06
- [Emacs-diffs] shr-fontified e449d32 1/7: Use `window-text-pixel-size', Lars Ingebrigtsen, 2015/02/06
- [Emacs-diffs] shr-fontified 6e7b53d 3/7: (shr-fold-line): Fix up implementation based on `window-text-pixel-size'., Lars Ingebrigtsen, 2015/02/06
- [Emacs-diffs] shr-fontified 38f1545 2/7: Rely more on `vertical-motion', Lars Ingebrigtsen, 2015/02/06
- [Emacs-diffs] shr-fontified a4d3110 4/7: Revert the window-text-pixel-size change from the trunk,
Lars Ingebrigtsen <=
- [Emacs-diffs] shr-fontified f8d6b5c 5/7: (shr-expand-alignments): Get indentation of nested tables right., Lars Ingebrigtsen, 2015/02/06
- [Emacs-diffs] shr-fontified 7f17091 6/7: Add more table layout caching, Lars Ingebrigtsen, 2015/02/06
- [Emacs-diffs] shr-fontified ef5a49e 7/7: (shr-insert-table-ruler): Compute the separator pixel width only once., Lars Ingebrigtsen, 2015/02/06