From: Dmitry Antipov Date: Fri, 29 Jun 2012 11:48:08 +0000 (+0400) Subject: * lisp/fringe.el (fringe-mode): Doc fix. X-Git-Tag: emacs-24.2.90~1199^2~286 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2af3565e0f2b325924e4adad26a08b442fa022ac;p=emacs.git * lisp/fringe.el (fringe-mode): Doc fix. * src/window.h (struct window): Change type of 'fringes_outside_margins' to bitfield. Fix comment. Adjust users accordingly. (struct window): Change type of 'window_end_bytepos' to ptrdiff_t. Adjust comment. * src/xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos' to ptrdiff_t. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 788a94e01b3..064b141cdde 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-06-29 Dmitry Antipov + + * fringe.el (fringe-mode): Doc fix. + 2012-06-29 Michael Albinus * net/ange-ftp.el (ange-ftp-get-passwd): Throw if `non-essential' diff --git a/lisp/fringe.el b/lisp/fringe.el index 70a28bd92f9..0c7e7eb194c 100644 --- a/lisp/fringe.el +++ b/lisp/fringe.el @@ -207,8 +207,8 @@ frame parameter is used." "Set the default appearance of fringes on all frames. When called interactively, query the user for MODE. Valid values -for MODE include `none', `default', `left-only', `right-only', -`minimal' and `half'. +for MODE include `no-fringes', `default', `left-only', `right-only', +`minimal' and `half-width'. When used in a Lisp program, MODE can be a cons cell where the integer in car specifies the left fringe width and the integer in diff --git a/src/ChangeLog b/src/ChangeLog index 29fc2561c03..e5517eeb8db 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2012-06-29 Dmitry Antipov + + * window.h (struct window): Change type of 'fringes_outside_margins' + to bitfield. Fix comment. Adjust users accordingly. + (struct window): Change type of 'window_end_bytepos' to ptrdiff_t. + Adjust comment. + * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos' + to ptrdiff_t. + 2012-06-29 Andreas Schwab * gnutls.c (emacs_gnutls_handshake): diff --git a/src/window.c b/src/window.c index 9d78a3efa60..7691eb4dca9 100644 --- a/src/window.c +++ b/src/window.c @@ -5542,7 +5542,7 @@ the return value is nil. Otherwise the value is t. */) w->right_margin_cols = p->right_margin_cols; w->left_fringe_width = p->left_fringe_width; w->right_fringe_width = p->right_fringe_width; - w->fringes_outside_margins = p->fringes_outside_margins; + w->fringes_outside_margins = !NILP (p->fringes_outside_margins); w->scroll_bar_width = p->scroll_bar_width; w->vertical_scroll_bar_type = p->vertical_scroll_bar_type; w->dedicated = p->dedicated; @@ -5858,7 +5858,7 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i) p->right_margin_cols = w->right_margin_cols; p->left_fringe_width = w->left_fringe_width; p->right_fringe_width = w->right_fringe_width; - p->fringes_outside_margins = w->fringes_outside_margins; + p->fringes_outside_margins = w->fringes_outside_margins ? Qt : Qnil; p->scroll_bar_width = w->scroll_bar_width; p->vertical_scroll_bar_type = w->vertical_scroll_bar_type; p->dedicated = w->dedicated; @@ -6095,6 +6095,7 @@ display marginal areas and the text area. */) (Lisp_Object window, Lisp_Object left_width, Lisp_Object right_width, Lisp_Object outside_margins) { struct window *w = decode_window (window); + int outside = !NILP (outside_margins); if (!NILP (left_width)) CHECK_NATNUM (left_width); @@ -6105,11 +6106,11 @@ display marginal areas and the text area. */) if (FRAME_WINDOW_P (WINDOW_XFRAME (w)) && (!EQ (w->left_fringe_width, left_width) || !EQ (w->right_fringe_width, right_width) - || !EQ (w->fringes_outside_margins, outside_margins))) + || w->fringes_outside_margins != outside)) { w->left_fringe_width = left_width; w->right_fringe_width = right_width; - w->fringes_outside_margins = outside_margins; + w->fringes_outside_margins = outside; adjust_window_margins (w); diff --git a/src/window.h b/src/window.h index 50bd7134f27..34b5bb7a0dd 100644 --- a/src/window.h +++ b/src/window.h @@ -159,9 +159,6 @@ struct window /* Width of left and right fringes. A value of nil or t means use frame values. */ Lisp_Object left_fringe_width, right_fringe_width; - /* Non-nil means fringes are drawn outside display margins; - othersize draw them between margin areas and text. */ - Lisp_Object fringes_outside_margins; /* Pixel width of scroll bars. A value of nil or t means use frame values. */ @@ -330,13 +327,17 @@ struct window accept that. */ unsigned frozen_window_start_p : 1; + /* Non-zero means fringes are drawn outside display margins. + Otherwise draw them between margin areas and text. */ + unsigned fringes_outside_margins : 1; + /* Amount by which lines of this window are scrolled in y-direction (smooth scrolling). */ int vscroll; - /* Z_BYTE - the buffer position of the last glyph in the current matrix - of W. Only valid if WINDOW_END_VALID is not nil. */ - int window_end_bytepos; + /* Z_BYTE - the buffer position of the last glyph in the current matrix of W. + Should be nonnegative, and only valid if window_end_valid is not nil. */ + ptrdiff_t window_end_bytepos; }; /* 1 if W is a minibuffer window. */ @@ -612,7 +613,7 @@ struct window /* Are fringes outside display margins in window W. */ #define WINDOW_HAS_FRINGES_OUTSIDE_MARGINS(W) \ - (!NILP ((W)->fringes_outside_margins)) + ((W)->fringes_outside_margins) /* Say whether scroll bars are currently enabled for window W, and which side they are on. */ diff --git a/src/xdisp.c b/src/xdisp.c index ae06355ac60..0b1012990d3 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -17761,8 +17761,8 @@ try_window_id (struct window *w) { /* Displayed to end of window, but no line containing text was displayed. Lines were deleted at the end of the window. */ - int first_vpos = WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0; - int vpos = XFASTINT (w->window_end_vpos); + ptrdiff_t first_vpos = WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0; + ptrdiff_t vpos = XFASTINT (w->window_end_vpos); struct glyph_row *current_row = current_matrix->rows + vpos; struct glyph_row *desired_row = desired_matrix->rows + vpos;