Now on revision 113865. ------------------------------------------------------------ revno: 113865 committer: Dmitry Antipov branch nick: trunk timestamp: Wed 2013-08-14 10:06:56 +0400 message: * xdisp.c (adjust_window_ends): Move duplicated code to new function. (try_window, try_window_reusing_current_matrix, try_window_id): Use it. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-14 05:41:48 +0000 +++ src/ChangeLog 2013-08-14 06:06:56 +0000 @@ -1,5 +1,10 @@ 2013-08-14 Dmitry Antipov + * xdisp.c (adjust_window_ends): Move duplicated code to new function. + (try_window, try_window_reusing_current_matrix, try_window_id): Use it. + +2013-08-14 Dmitry Antipov + * window.h (struct window): Convert window_end_pos and window_end_vpos from Lisp_Object to ptrdiff_t and int, respectively. (wset_window_end_pos, wset_window_end_vpos): Remove. === modified file 'src/xdisp.c' --- src/xdisp.c 2013-08-14 05:41:48 +0000 +++ src/xdisp.c 2013-08-14 06:06:56 +0000 @@ -2461,7 +2461,16 @@ #endif /* HAVE_WINDOW_SYSTEM */ - +static void +adjust_window_ends (struct window *w, struct glyph_row *row, bool current) +{ + eassert (w); + w->window_end_pos = Z - MATRIX_ROW_END_CHARPOS (row); + w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row); + w->window_end_vpos + = MATRIX_ROW_VPOS (row, current ? w->current_matrix : w->desired_matrix); +} + /*********************************************************************** Lisp form evaluation ***********************************************************************/ @@ -16291,9 +16300,7 @@ if (last_text_row) { eassert (MATRIX_ROW_DISPLAYS_TEXT_P (last_text_row)); - w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); - w->window_end_pos = Z - MATRIX_ROW_END_CHARPOS (last_text_row); - w->window_end_vpos = MATRIX_ROW_VPOS (last_text_row, w->desired_matrix); + adjust_window_ends (w, last_text_row, 0); eassert (MATRIX_ROW_DISPLAYS_TEXT_P (MATRIX_ROW (w->desired_matrix, w->window_end_vpos))); @@ -16526,23 +16533,9 @@ The value of last_text_row is the last displayed line containing text. */ if (last_reused_text_row) - { - w->window_end_bytepos - = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_reused_text_row); - w->window_end_pos - = Z - MATRIX_ROW_END_CHARPOS (last_reused_text_row); - w->window_end_vpos - = MATRIX_ROW_VPOS (last_reused_text_row, w->current_matrix); - } + adjust_window_ends (w, last_reused_text_row, 1); else if (last_text_row) - { - w->window_end_bytepos - = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); - w->window_end_pos - = Z - MATRIX_ROW_END_CHARPOS (last_text_row); - w->window_end_vpos - = MATRIX_ROW_VPOS (last_text_row, w->desired_matrix); - } + adjust_window_ends (w, last_text_row, 0); else { /* This window must be completely empty. */ @@ -16733,14 +16726,7 @@ the window end is in reused rows which in turn means that only its vpos can have changed. */ if (last_text_row) - { - w->window_end_bytepos - = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); - w->window_end_pos - = Z - MATRIX_ROW_END_CHARPOS (last_text_row); - w->window_end_vpos - = MATRIX_ROW_VPOS (last_text_row, w->desired_matrix); - } + adjust_window_ends (w, last_text_row, 0); else w->window_end_vpos -= nrows_scrolled; @@ -17748,21 +17734,13 @@ row = find_last_row_displaying_text (w->current_matrix, &it, first_unchanged_at_end_row); eassert (row && MATRIX_ROW_DISPLAYS_TEXT_P (row)); - - w->window_end_pos = Z - MATRIX_ROW_END_CHARPOS (row); - w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row); - w->window_end_vpos = MATRIX_ROW_VPOS (row, w->current_matrix); + adjust_window_ends (w, row, 1); eassert (w->window_end_bytepos >= 0); IF_DEBUG (debug_method_add (w, "A")); } else if (last_text_row_at_end) { - w->window_end_pos - = Z - MATRIX_ROW_END_CHARPOS (last_text_row_at_end); - w->window_end_bytepos - = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row_at_end); - w->window_end_vpos - = MATRIX_ROW_VPOS (last_text_row_at_end, desired_matrix); + adjust_window_ends (w, last_text_row_at_end, 0); eassert (w->window_end_bytepos >= 0); IF_DEBUG (debug_method_add (w, "B")); } @@ -17771,11 +17749,7 @@ /* We have displayed either to the end of the window or at the end of the window, i.e. the last row with text is to be found in the desired matrix. */ - w->window_end_pos - = Z - MATRIX_ROW_END_CHARPOS (last_text_row); - w->window_end_bytepos - = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); - w->window_end_vpos = MATRIX_ROW_VPOS (last_text_row, desired_matrix); + adjust_window_ends (w, last_text_row, 0); eassert (w->window_end_bytepos >= 0); } else if (first_unchanged_at_end_row == NULL ------------------------------------------------------------ revno: 113864 committer: Dmitry Antipov branch nick: trunk timestamp: Wed 2013-08-14 09:41:48 +0400 message: * window.h (struct window): Convert window_end_pos and window_end_vpos from Lisp_Object to ptrdiff_t and int, respectively. (wset_window_end_pos, wset_window_end_vpos): Remove. * dispnew.c (adjust_glyph_matrix): * window.c (Fwindow_end, replace_window, set_window_buffer) (make_window): * xdisp.c (check_window_end, move_it_to, redisplay_internal) (set_vertical_scroll_bar, redisplay_window, try_window) (try_window_reusing_current_matrix, find_first_unchanged_at_end_row) (try_window_id, decode_mode_spec, mouse_face_from_buffer_pos) (note_mouse_highlight): Adjust users. (try_cursor_movement): Likewise. Convert old precondition to eassert. Add comment. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-14 04:27:32 +0000 +++ src/ChangeLog 2013-08-14 05:41:48 +0000 @@ -1,5 +1,21 @@ 2013-08-14 Dmitry Antipov + * window.h (struct window): Convert window_end_pos and + window_end_vpos from Lisp_Object to ptrdiff_t and int, respectively. + (wset_window_end_pos, wset_window_end_vpos): Remove. + * dispnew.c (adjust_glyph_matrix): + * window.c (Fwindow_end, replace_window, set_window_buffer) + (make_window): + * xdisp.c (check_window_end, move_it_to, redisplay_internal) + (set_vertical_scroll_bar, redisplay_window, try_window) + (try_window_reusing_current_matrix, find_first_unchanged_at_end_row) + (try_window_id, decode_mode_spec, mouse_face_from_buffer_pos) + (note_mouse_highlight): Adjust users. + (try_cursor_movement): Likewise. Convert old precondition to eassert. + Add comment. + +2013-08-14 Dmitry Antipov + Fix --enable-gcc-warnings errors introduced in 2013-08-13 commit. * image.c (imagemagick_filename_hint): Use `const char *' and prefer SSDATA to SDATA to avoid warnings. === modified file 'src/dispnew.c' --- src/dispnew.c 2013-08-13 14:45:58 +0000 +++ src/dispnew.c 2013-08-14 05:41:48 +0000 @@ -598,8 +598,7 @@ /* Window end is invalid, if inside of the rows that are invalidated below. */ - if (INTEGERP (w->window_end_vpos) - && XFASTINT (w->window_end_vpos) >= i) + if (w->window_end_vpos >= i) w->window_end_valid = 0; while (i < matrix->nrows) === modified file 'src/window.c' --- src/window.c 2013-08-14 04:09:37 +0000 +++ src/window.c 2013-08-14 05:41:48 +0000 @@ -1539,7 +1539,7 @@ set_buffer_internal (old_buffer); } else - XSETINT (value, BUF_Z (b) - XFASTINT (w->window_end_pos)); + XSETINT (value, BUF_Z (b) - w->window_end_pos); return value; } @@ -2033,8 +2033,8 @@ n->phys_cursor_width = -1; n->must_be_updated_p = 0; n->pseudo_window_p = 0; - wset_window_end_vpos (n, make_number (0)); - wset_window_end_pos (n, make_number (0)); + n->window_end_vpos = 0; + n->window_end_pos = 0; n->window_end_valid = 0; } @@ -3170,8 +3170,8 @@ bset_display_count (b, make_number (XINT (BVAR (b, display_count)) + 1)); bset_display_time (b, Fcurrent_time ()); - wset_window_end_pos (w, make_number (0)); - wset_window_end_vpos (w, make_number (0)); + w->window_end_pos = 0; + w->window_end_vpos = 0; memset (&w->last_cursor, 0, sizeof w->last_cursor); if (!(keep_margins_p && samebuf)) @@ -3437,8 +3437,6 @@ wset_start (w, Fmake_marker ()); wset_pointm (w, Fmake_marker ()); wset_vertical_scroll_bar_type (w, Qt); - wset_window_end_pos (w, make_number (0)); - wset_window_end_vpos (w, make_number (0)); /* These Lisp fields are marked specially so they're not set to nil by allocate_window. */ wset_prev_buffers (w, Qnil); === modified file 'src/window.h' --- src/window.h 2013-08-14 04:07:14 +0000 +++ src/window.h 2013-08-14 05:41:48 +0000 @@ -145,14 +145,6 @@ no scroll bar. A value of t means use frame value. */ Lisp_Object vertical_scroll_bar_type; - /* Z - the buffer position of the last glyph in the current - matrix of W. Only valid if window_end_valid is nonzero. */ - Lisp_Object window_end_pos; - - /* Glyph matrix row of the last glyph in the current matrix - of W. Only valid if window_end_valid is nonzero. */ - Lisp_Object window_end_vpos; - /* Display-table to use for displaying chars in this window. Nil means use the buffer's own display-table. */ Lisp_Object display_table; @@ -269,6 +261,14 @@ A value of -1 means use frame values. */ int scroll_bar_width; + /* Z - the buffer position of the last glyph in the current + matrix of W. Only valid if window_end_valid is nonzero. */ + ptrdiff_t window_end_pos; + + /* Glyph matrix row of the last glyph in the current matrix + of W. Only valid if window_end_valid is nonzero. */ + int window_end_vpos; + /* Non-zero if this window is a minibuffer window. */ unsigned mini : 1; @@ -366,16 +366,6 @@ w->vertical_scroll_bar = val; } WINDOW_INLINE void -wset_window_end_pos (struct window *w, Lisp_Object val) -{ - w->window_end_pos = val; -} -WINDOW_INLINE void -wset_window_end_vpos (struct window *w, Lisp_Object val) -{ - w->window_end_vpos = val; -} -WINDOW_INLINE void wset_prev_buffers (struct window *w, Lisp_Object val) { w->prev_buffers = val; === modified file 'src/xdisp.c' --- src/xdisp.c 2013-08-13 14:45:58 +0000 +++ src/xdisp.c 2013-08-14 05:41:48 +0000 @@ -2597,8 +2597,7 @@ if (!MINI_WINDOW_P (w) && w->window_end_valid) { struct glyph_row *row; - eassert ((row = MATRIX_ROW (w->current_matrix, - XFASTINT (w->window_end_vpos)), + eassert ((row = MATRIX_ROW (w->current_matrix, w->window_end_vpos), !row->enabled_p || MATRIX_ROW_DISPLAYS_TEXT_P (row) || MATRIX_ROW_VPOS (row, w->current_matrix) == 0)); @@ -9054,7 +9053,7 @@ && it->current_x == it->last_visible_x - 1 && it->c != '\n' && it->c != '\t' - && it->vpos < XFASTINT (it->w->window_end_vpos)) + && it->vpos < it->w->window_end_vpos) { it->continuation_lines_width += it->current_x; it->current_x = it->hpos = it->max_ascent = it->max_descent = 0; @@ -13268,12 +13267,12 @@ adjusted. */ if (MATRIX_ROW_DISPLAYS_TEXT_P (it.glyph_row - 1)) { - if (XFASTINT (w->window_end_vpos) < this_line_vpos) - wset_window_end_vpos (w, make_number (this_line_vpos)); + if (w->window_end_vpos < this_line_vpos) + w->window_end_vpos = this_line_vpos; } - else if (XFASTINT (w->window_end_vpos) == this_line_vpos + else if (w->window_end_vpos == this_line_vpos && this_line_vpos > 0) - wset_window_end_vpos (w, make_number (this_line_vpos - 1)); + w->window_end_vpos = this_line_vpos - 1; w->window_end_valid = 0; /* Update hint: No need to try to scroll in update_window. */ @@ -14956,6 +14955,10 @@ if-statement below. Now, this field is converted to ptrdiff_t, thus zero means invalid position in a buffer. */ eassert (w->last_point > 0); + /* Likewise there was a check whether window_end_vpos is nil or larger + than the window. Now window_end_vpos is int and so never nil, but + let's leave eassert to check whether it fits in the window. */ + eassert (w->window_end_vpos < w->current_matrix->nrows); /* Handle case where text has not changed, only point, and it has not moved off the frame. */ @@ -14983,13 +14986,6 @@ since the handling of this_line_start_pos, etc., in redisplay handles the same cases. */ && !EQ (window, minibuf_window) - /* When splitting windows or for new windows, it happens that - redisplay is called with a nil window_end_vpos or one being - larger than the window. This should really be fixed in - window.c. I don't have this on my list, now, so we do - approximately the same as the old redisplay code. --gerd. */ - && INTEGERP (w->window_end_vpos) - && XFASTINT (w->window_end_vpos) < w->current_matrix->nrows && (FRAME_WINDOW_P (f) || !overlay_arrow_in_current_buffer_p ())) { @@ -15303,7 +15299,7 @@ start = marker_position (w->start) - BUF_BEGV (buf); /* I don't think this is guaranteed to be right. For the moment, we'll pretend it is. */ - end = BUF_Z (buf) - XFASTINT (w->window_end_pos) - BUF_BEGV (buf); + end = BUF_Z (buf) - w->window_end_pos - BUF_BEGV (buf); if (end < start) end = start; @@ -15993,7 +15989,7 @@ line.) */ if (w->cursor.vpos < 0) { - if (w->window_end_valid && PT >= Z - XFASTINT (w->window_end_pos)) + if (w->window_end_valid && PT >= Z - w->window_end_pos) { clear_glyph_matrix (w->desired_matrix); move_it_by_lines (&it, 1); @@ -16286,8 +16282,7 @@ } /* If bottom moved off end of frame, change mode line percentage. */ - if (XFASTINT (w->window_end_pos) <= 0 - && Z != IT_CHARPOS (it)) + if (w->window_end_pos <= 0 && Z != IT_CHARPOS (it)) w->update_mode_line = 1; /* Set window_end_pos to the offset of the last character displayed @@ -16296,21 +16291,18 @@ if (last_text_row) { eassert (MATRIX_ROW_DISPLAYS_TEXT_P (last_text_row)); - w->window_end_bytepos - = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); - wset_window_end_pos - (w, make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row))); - wset_window_end_vpos - (w, make_number (MATRIX_ROW_VPOS (last_text_row, w->desired_matrix))); + w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); + w->window_end_pos = Z - MATRIX_ROW_END_CHARPOS (last_text_row); + w->window_end_vpos = MATRIX_ROW_VPOS (last_text_row, w->desired_matrix); eassert (MATRIX_ROW_DISPLAYS_TEXT_P (MATRIX_ROW (w->desired_matrix, - XFASTINT (w->window_end_vpos)))); + w->window_end_vpos))); } else { w->window_end_bytepos = Z_BYTE - ZV_BYTE; - wset_window_end_pos (w, make_number (Z - ZV)); - wset_window_end_vpos (w, make_number (0)); + w->window_end_pos = Z - ZV; + w->window_end_vpos = 0; } /* But that is not valid info until redisplay finishes. */ @@ -16537,29 +16529,26 @@ { w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_reused_text_row); - wset_window_end_pos - (w, make_number (Z - - MATRIX_ROW_END_CHARPOS (last_reused_text_row))); - wset_window_end_vpos - (w, make_number (MATRIX_ROW_VPOS (last_reused_text_row, - w->current_matrix))); + w->window_end_pos + = Z - MATRIX_ROW_END_CHARPOS (last_reused_text_row); + w->window_end_vpos + = MATRIX_ROW_VPOS (last_reused_text_row, w->current_matrix); } else if (last_text_row) { w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); - wset_window_end_pos - (w, make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row))); - wset_window_end_vpos - (w, make_number (MATRIX_ROW_VPOS (last_text_row, - w->desired_matrix))); + w->window_end_pos + = Z - MATRIX_ROW_END_CHARPOS (last_text_row); + w->window_end_vpos + = MATRIX_ROW_VPOS (last_text_row, w->desired_matrix); } else { /* This window must be completely empty. */ w->window_end_bytepos = Z_BYTE - ZV_BYTE; - wset_window_end_pos (w, make_number (Z - ZV)); - wset_window_end_vpos (w, make_number (0)); + w->window_end_pos = Z - ZV; + w->window_end_vpos = 0; } w->window_end_valid = 0; @@ -16747,17 +16736,13 @@ { w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); - wset_window_end_pos - (w, make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row))); - wset_window_end_vpos - (w, make_number (MATRIX_ROW_VPOS (last_text_row, - w->desired_matrix))); + w->window_end_pos + = Z - MATRIX_ROW_END_CHARPOS (last_text_row); + w->window_end_vpos + = MATRIX_ROW_VPOS (last_text_row, w->desired_matrix); } else - { - wset_window_end_vpos - (w, make_number (XFASTINT (w->window_end_vpos) - nrows_scrolled)); - } + w->window_end_vpos -= nrows_scrolled; w->window_end_valid = 0; w->desired_matrix->no_scrolling_p = 1; @@ -16897,11 +16882,11 @@ /* A value of window_end_pos >= END_UNCHANGED means that the window end is in the range of changed text. If so, there is no unchanged row at the end of W's current matrix. */ - if (XFASTINT (w->window_end_pos) >= END_UNCHANGED) + if (w->window_end_pos >= END_UNCHANGED) return NULL; /* Set row to the last row in W's current matrix displaying text. */ - row = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); + row = MATRIX_ROW (w->current_matrix, w->window_end_vpos); /* If matrix is entirely empty, no unchanged row exists. */ if (MATRIX_ROW_DISPLAYS_TEXT_P (row)) @@ -16912,7 +16897,7 @@ buffer positions in the current matrix to current buffer positions for characters not in changed text. */ ptrdiff_t Z_old = - MATRIX_ROW_END_CHARPOS (row) + XFASTINT (w->window_end_pos); + MATRIX_ROW_END_CHARPOS (row) + w->window_end_pos; ptrdiff_t Z_BYTE_old = MATRIX_ROW_END_BYTEPOS (row) + w->window_end_bytepos; ptrdiff_t last_unchanged_pos, last_unchanged_pos_old; @@ -17246,7 +17231,7 @@ This case happens with stealth-fontification. Note that although the display is unchanged, glyph positions in the matrix have to be adjusted, of course. */ - row = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); + row = MATRIX_ROW (w->current_matrix, w->window_end_vpos); if (MATRIX_ROW_DISPLAYS_TEXT_P (row) && ((last_changed_charpos < CHARPOS (start) && CHARPOS (start) == BEGV) @@ -17258,7 +17243,7 @@ /* Compute how many chars/bytes have been added to or removed from the buffer. */ - Z_old = MATRIX_ROW_END_CHARPOS (row) + XFASTINT (w->window_end_pos); + Z_old = MATRIX_ROW_END_CHARPOS (row) + w->window_end_pos; Z_BYTE_old = MATRIX_ROW_END_BYTEPOS (row) + w->window_end_bytepos; Z_delta = Z - Z_old; Z_delta_bytes = Z_BYTE - Z_BYTE_old; @@ -17329,10 +17314,8 @@ { /* We have to compute the window end anew since text could have been added/removed after it. */ - wset_window_end_pos - (w, make_number (Z - MATRIX_ROW_END_CHARPOS (row))); - w->window_end_bytepos - = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row); + w->window_end_pos = Z - MATRIX_ROW_END_CHARPOS (row); + w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row); /* Set the cursor. */ row = row_containing_pos (w, PT, r0, NULL, 0); @@ -17365,7 +17348,7 @@ /* Give up if the window ends in strings. Overlay strings at the end are difficult to handle, so don't try. */ - row = MATRIX_ROW (current_matrix, XFASTINT (w->window_end_vpos)); + row = MATRIX_ROW (current_matrix, w->window_end_vpos); if (MATRIX_ROW_START_CHARPOS (row) == MATRIX_ROW_END_CHARPOS (row)) GIVE_UP (20); @@ -17711,7 +17694,7 @@ /* Set last_row to the glyph row in the current matrix where the window end line is found. It has been moved up or down in the matrix by dvpos. */ - int last_vpos = XFASTINT (w->window_end_vpos) + dvpos; + int last_vpos = w->window_end_vpos + dvpos; struct glyph_row *last_row = MATRIX_ROW (current_matrix, last_vpos); /* If last_row is the window end line, it should display text. */ @@ -17755,8 +17738,7 @@ } /* Update window_end_pos and window_end_vpos. */ - if (first_unchanged_at_end_row - && !last_text_row_at_end) + if (first_unchanged_at_end_row && !last_text_row_at_end) { /* Window end line if one of the preserved rows from the current matrix. Set row to the last row displaying text in current @@ -17767,22 +17749,20 @@ first_unchanged_at_end_row); eassert (row && MATRIX_ROW_DISPLAYS_TEXT_P (row)); - wset_window_end_pos (w, make_number (Z - MATRIX_ROW_END_CHARPOS (row))); + w->window_end_pos = Z - MATRIX_ROW_END_CHARPOS (row); w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row); - wset_window_end_vpos - (w, make_number (MATRIX_ROW_VPOS (row, w->current_matrix))); + w->window_end_vpos = MATRIX_ROW_VPOS (row, w->current_matrix); eassert (w->window_end_bytepos >= 0); IF_DEBUG (debug_method_add (w, "A")); } else if (last_text_row_at_end) { - wset_window_end_pos - (w, make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row_at_end))); + w->window_end_pos + = Z - MATRIX_ROW_END_CHARPOS (last_text_row_at_end); w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row_at_end); - wset_window_end_vpos - (w, make_number (MATRIX_ROW_VPOS (last_text_row_at_end, - desired_matrix))); + w->window_end_vpos + = MATRIX_ROW_VPOS (last_text_row_at_end, desired_matrix); eassert (w->window_end_bytepos >= 0); IF_DEBUG (debug_method_add (w, "B")); } @@ -17791,12 +17771,11 @@ /* We have displayed either to the end of the window or at the end of the window, i.e. the last row with text is to be found in the desired matrix. */ - wset_window_end_pos - (w, make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row))); + w->window_end_pos + = Z - MATRIX_ROW_END_CHARPOS (last_text_row); w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); - wset_window_end_vpos - (w, make_number (MATRIX_ROW_VPOS (last_text_row, desired_matrix))); + w->window_end_vpos = MATRIX_ROW_VPOS (last_text_row, desired_matrix); eassert (w->window_end_bytepos >= 0); } else if (first_unchanged_at_end_row == NULL @@ -17806,7 +17785,7 @@ /* 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); + int vpos = w->window_end_vpos; struct glyph_row *current_row = current_matrix->rows + vpos; struct glyph_row *desired_row = desired_matrix->rows + vpos; @@ -17824,8 +17803,8 @@ } eassert (row != NULL); - wset_window_end_vpos (w, make_number (vpos + 1)); - wset_window_end_pos (w, make_number (Z - MATRIX_ROW_END_CHARPOS (row))); + w->window_end_vpos = vpos + 1; + w->window_end_pos = Z - MATRIX_ROW_END_CHARPOS (row); w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row); eassert (w->window_end_bytepos >= 0); IF_DEBUG (debug_method_add (w, "C")); @@ -17833,8 +17812,8 @@ else emacs_abort (); - IF_DEBUG (debug_end_pos = XFASTINT (w->window_end_pos); - debug_end_vpos = XFASTINT (w->window_end_vpos)); + IF_DEBUG (debug_end_pos = w->window_end_pos; + debug_end_vpos = w->window_end_vpos); /* Record that display has not been completed. */ w->window_end_valid = 0; @@ -22002,7 +21981,7 @@ ptrdiff_t pos = marker_position (w->start); ptrdiff_t total = BUF_ZV (b) - BUF_BEGV (b); - if (XFASTINT (w->window_end_pos) <= BUF_Z (b) - BUF_ZV (b)) + if (w->window_end_pos <= BUF_Z (b) - BUF_ZV (b)) { if (pos <= BUF_BEGV (b)) return "All"; @@ -22031,7 +22010,7 @@ case 'P': { ptrdiff_t toppos = marker_position (w->start); - ptrdiff_t botpos = BUF_Z (b) - XFASTINT (w->window_end_pos); + ptrdiff_t botpos = BUF_Z (b) - w->window_end_pos; ptrdiff_t total = BUF_ZV (b) - BUF_BEGV (b); if (botpos >= BUF_ZV (b)) @@ -27040,7 +27019,7 @@ /* Find the rows corresponding to START_CHARPOS and END_CHARPOS. */ rows_from_pos_range (w, start_charpos, end_charpos, disp_string, &r1, &r2); if (r1 == NULL) - r1 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); + r1 = MATRIX_ROW (w->current_matrix, w->window_end_vpos); /* If the before-string or display-string contains newlines, rows_from_pos_range skips to its last row. Move back. */ if (!NILP (before_string) || !NILP (disp_string)) @@ -27062,7 +27041,7 @@ } if (r2 == NULL) { - r2 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); + r2 = MATRIX_ROW (w->current_matrix, w->window_end_vpos); hlinfo->mouse_face_past_end = 1; } else if (!NILP (after_string)) @@ -27070,7 +27049,7 @@ /* If the after-string has newlines, advance to its last row. */ struct glyph_row *next; struct glyph_row *last - = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); + = MATRIX_ROW (w->current_matrix, w->window_end_vpos); for (next = r2 + 1; next <= last @@ -28376,8 +28355,7 @@ : Qnil; Lisp_Object lim2 = NILP (BVAR (XBUFFER (buffer), bidi_display_reordering)) - ? make_number (BUF_Z (XBUFFER (buffer)) - - XFASTINT (w->window_end_pos)) + ? make_number (BUF_Z (XBUFFER (buffer)) - w->window_end_pos) : Qnil; if (NILP (overlay)) ------------------------------------------------------------ revno: 113863 committer: Dmitry Antipov branch nick: trunk timestamp: Wed 2013-08-14 08:27:32 +0400 message: Fix --enable-gcc-warnings errors introduced in 2013-08-13 commit. * image.c (imagemagick_filename_hint): Use `const char *' and prefer SSDATA to SDATA to avoid warnings. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-14 04:09:37 +0000 +++ src/ChangeLog 2013-08-14 04:27:32 +0000 @@ -1,5 +1,11 @@ 2013-08-14 Dmitry Antipov + Fix --enable-gcc-warnings errors introduced in 2013-08-13 commit. + * image.c (imagemagick_filename_hint): Use `const char *' and + prefer SSDATA to SDATA to avoid warnings. + +2013-08-14 Dmitry Antipov + Cleanup window fringes, margins and scroll bars adjustments. * window.c (set_window_fringes, set_window_margins) (set_window_scroll_bars, apply_window_adjustment): New functions. === modified file 'src/image.c' --- src/image.c 2013-08-13 20:13:02 +0000 +++ src/image.c 2013-08-14 04:27:32 +0000 @@ -7851,9 +7851,9 @@ imagemagick_filename_hint (Lisp_Object spec) { Lisp_Object format = image_spec_value (spec, intern (":format"), NULL); - Lisp_Object symbol = intern ("image-format-suffixes"); - Lisp_Object val; - char *name, *prefix = "/tmp/foo."; + Lisp_Object val, symbol = intern ("image-format-suffixes"); + const char *prefix = "/tmp/foo."; + char *name; if (NILP (Fboundp (symbol))) return NULL; @@ -7871,8 +7871,8 @@ return NULL; name = xmalloc (strlen (prefix) + SBYTES (val) + 1); - strcpy(name, prefix); - strcat(name, SDATA (val)); + strcpy (name, prefix); + strcat (name, SSDATA (val)); return name; } ------------------------------------------------------------ revno: 113862 committer: Dmitry Antipov branch nick: trunk timestamp: Wed 2013-08-14 08:09:37 +0400 message: Cleanup window fringes, margins and scroll bars adjustments. * window.c (set_window_fringes, set_window_margins) (set_window_scroll_bars, apply_window_adjustment): New functions. (set_window_buffer, Fset_window_margins, Fset_window_fringes) (Fset_window_scroll_bars): Use them. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-14 04:07:14 +0000 +++ src/ChangeLog 2013-08-14 04:09:37 +0000 @@ -1,5 +1,13 @@ 2013-08-14 Dmitry Antipov + Cleanup window fringes, margins and scroll bars adjustments. + * window.c (set_window_fringes, set_window_margins) + (set_window_scroll_bars, apply_window_adjustment): New functions. + (set_window_buffer, Fset_window_margins, Fset_window_fringes) + (Fset_window_scroll_bars): Use them. + +2013-08-14 Dmitry Antipov + * window.h (struct window): Convert scroll_bar_width from Lisp_Object to integer. Adjust comment. (WINDOW_CONFIG_SCROLL_BAR_WIDTH, WINDOW_CONFIG_SCROLL_BAR_COLS): === modified file 'src/window.c' --- src/window.c 2013-08-14 04:07:14 +0000 +++ src/window.c 2013-08-14 04:09:37 +0000 @@ -87,6 +87,14 @@ static Lisp_Object select_window (Lisp_Object, Lisp_Object, int); static void select_window_1 (Lisp_Object, bool); +static struct window *set_window_fringes (struct window *, Lisp_Object, + Lisp_Object, Lisp_Object); +static struct window *set_window_margins (struct window *, Lisp_Object, + Lisp_Object); +static struct window *set_window_scroll_bars (struct window *, Lisp_Object, + Lisp_Object, Lisp_Object); +static void apply_window_adjustment (struct window *); + /* This is the window in which the terminal's cursor should be left when nothing is being done with it. This must always be a leaf window, and its buffer is selected by @@ -3202,28 +3210,14 @@ if (!keep_margins_p) { /* Set left and right marginal area width etc. from buffer. */ - - /* This may call adjust_window_margins three times, so - temporarily disable window margins. */ - int save_left = w->left_margin_cols; - int save_right = w->right_margin_cols; - - w->left_margin_cols = 0; - w->right_margin_cols = 0; - - Fset_window_fringes (window, - BVAR (b, left_fringe_width), BVAR (b, right_fringe_width), - BVAR (b, fringes_outside_margins)); - - Fset_window_scroll_bars (window, - BVAR (b, scroll_bar_width), - BVAR (b, vertical_scroll_bar_type), Qnil); - - w->left_margin_cols = save_left; - w->right_margin_cols = save_right; - - Fset_window_margins (window, - BVAR (b, left_margin_cols), BVAR (b, right_margin_cols)); + set_window_fringes (w, BVAR (b, left_fringe_width), + BVAR (b, right_fringe_width), + BVAR (b, fringes_outside_margins)); + set_window_scroll_bars (w, BVAR (b, scroll_bar_width), + BVAR (b, vertical_scroll_bar_type), Qnil); + set_window_margins (w, BVAR (b, left_margin_cols), + BVAR (b, right_margin_cols)); + apply_window_adjustment (w); } if (run_hooks_p) @@ -6112,11 +6106,46 @@ XSETWINDOW_CONFIGURATION (tem, data); return (tem); } + +/* Called after W's margins, fringes or scroll bars was adjusted. */ + +static void +apply_window_adjustment (struct window *w) +{ + eassert (w); + adjust_window_margins (w); + clear_glyph_matrix (w->current_matrix); + w->window_end_valid = 0; + windows_or_buffers_changed++; + adjust_glyphs (XFRAME (WINDOW_FRAME (w))); +} + /*********************************************************************** Marginal Areas ***********************************************************************/ +static struct window * +set_window_margins (struct window *w, Lisp_Object left_width, + Lisp_Object right_width) +{ + int left, right; + + /* FIXME: what about margins that are too wide? */ + left = (NILP (left_width) ? 0 + : (CHECK_NATNUM (left_width), XINT (left_width))); + right = (NILP (right_width) ? 0 + : (CHECK_NATNUM (right_width), XINT (right_width))); + + if (w->left_margin_cols != left || w->right_margin_cols != right) + { + w->left_margin_cols = left; + w->right_margin_cols = right; + return w; + } + return NULL; +} + DEFUN ("set-window-margins", Fset_window_margins, Sset_window_margins, 2, 3, 0, doc: /* Set width of marginal areas of window WINDOW. @@ -6130,29 +6159,9 @@ Return t if any margin was actually changed and nil otherwise. */) (Lisp_Object window, Lisp_Object left_width, Lisp_Object right_width) { - struct window *w = decode_live_window (window); - int left, right; - - /* FIXME: what about margins that are too wide? */ - - left = (NILP (left_width) ? 0 - : (CHECK_NATNUM (left_width), XINT (left_width))); - right = (NILP (right_width) ? 0 - : (CHECK_NATNUM (right_width), XINT (right_width))); - - if (w->left_margin_cols != left || w->right_margin_cols != right) - { - w->left_margin_cols = left; - w->right_margin_cols = right; - - adjust_window_margins (w); - - ++windows_or_buffers_changed; - adjust_glyphs (XFRAME (WINDOW_FRAME (w))); - return Qt; - } - - return Qnil; + struct window *w = set_window_margins (decode_live_window (window), + left_width, right_width); + return w ? (apply_window_adjustment (w), Qt) : Qnil; } @@ -6177,6 +6186,31 @@ Fringes ***********************************************************************/ +static struct window * +set_window_fringes (struct window *w, Lisp_Object left_width, + Lisp_Object right_width, Lisp_Object outside_margins) +{ + int left, right, outside = !NILP (outside_margins); + + left = (NILP (left_width) ? -1 + : (CHECK_NATNUM (left_width), XINT (left_width))); + right = (NILP (right_width) ? -1 + : (CHECK_NATNUM (right_width), XINT (right_width))); + + /* Do nothing on a tty or if nothing to actually change. */ + if (FRAME_WINDOW_P (WINDOW_XFRAME (w)) + && (w->left_fringe_width != left + || w->right_fringe_width != right + || w->fringes_outside_margins != outside)) + { + w->left_fringe_width = left; + w->right_fringe_width = right; + w->fringes_outside_margins = outside; + return w; + } + return NULL; +} + DEFUN ("set-window-fringes", Fset_window_fringes, Sset_window_fringes, 2, 4, 0, doc: /* Set the fringe widths of window WINDOW. @@ -6195,35 +6229,10 @@ (Lisp_Object window, Lisp_Object left_width, Lisp_Object right_width, Lisp_Object outside_margins) { - struct window *w = decode_live_window (window); - int left, right, outside = !NILP (outside_margins); - - left = (NILP (left_width) ? -1 - : (CHECK_NATNUM (left_width), XINT (left_width))); - right = (NILP (right_width) ? -1 - : (CHECK_NATNUM (right_width), XINT (right_width))); - - /* Do nothing on a tty or if nothing to actually change. */ - if (FRAME_WINDOW_P (WINDOW_XFRAME (w)) - && (w->left_fringe_width != left - || w->right_fringe_width != right - || w->fringes_outside_margins != outside)) - { - w->left_fringe_width = left; - w->right_fringe_width = right; - w->fringes_outside_margins = outside; - - adjust_window_margins (w); - - clear_glyph_matrix (w->current_matrix); - w->window_end_valid = 0; - - ++windows_or_buffers_changed; - adjust_glyphs (XFRAME (WINDOW_FRAME (w))); - return Qt; - } - - return Qnil; + struct window *w + = set_window_fringes (decode_live_window (window), + left_width, right_width, outside_margins); + return w ? (apply_window_adjustment (w), Qt) : Qnil; } @@ -6248,6 +6257,31 @@ Scroll bars ***********************************************************************/ +static struct window * +set_window_scroll_bars (struct window *w, Lisp_Object width, + Lisp_Object vertical_type, Lisp_Object horizontal_type) +{ + int iwidth = (NILP (width) ? -1 : (CHECK_NATNUM (width), XINT (width))); + + if (iwidth == 0) + vertical_type = Qnil; + + if (!(NILP (vertical_type) + || EQ (vertical_type, Qleft) + || EQ (vertical_type, Qright) + || EQ (vertical_type, Qt))) + error ("Invalid type of vertical scroll bar"); + + if (w->scroll_bar_width != iwidth + || !EQ (w->vertical_scroll_bar_type, vertical_type)) + { + w->scroll_bar_width = iwidth; + wset_vertical_scroll_bar_type (w, vertical_type); + return w; + } + return NULL; +} + DEFUN ("set-window-scroll-bars", Fset_window_scroll_bars, Sset_window_scroll_bars, 2, 4, 0, doc: /* Set width and type of scroll bars of window WINDOW. @@ -6265,35 +6299,10 @@ (Lisp_Object window, Lisp_Object width, Lisp_Object vertical_type, Lisp_Object horizontal_type) { - struct window *w = decode_live_window (window); - int iwidth = (NILP (width) ? -1 : (CHECK_NATNUM (width), XINT (width))); - - if (iwidth == 0) - vertical_type = Qnil; - - if (!(NILP (vertical_type) - || EQ (vertical_type, Qleft) - || EQ (vertical_type, Qright) - || EQ (vertical_type, Qt))) - error ("Invalid type of vertical scroll bar"); - - if (w->scroll_bar_width != iwidth - || !EQ (w->vertical_scroll_bar_type, vertical_type)) - { - w->scroll_bar_width = iwidth; - wset_vertical_scroll_bar_type (w, vertical_type); - - adjust_window_margins (w); - - clear_glyph_matrix (w->current_matrix); - w->window_end_valid = 0; - - ++windows_or_buffers_changed; - adjust_glyphs (XFRAME (WINDOW_FRAME (w))); - return Qt; - } - - return Qnil; + struct window *w + = set_window_scroll_bars (decode_live_window (window), + width, vertical_type, horizontal_type); + return w ? (apply_window_adjustment (w), Qt) : Qnil; } ------------------------------------------------------------ revno: 113861 committer: Dmitry Antipov branch nick: trunk timestamp: Wed 2013-08-14 08:07:14 +0400 message: * window.h (struct window): Convert scroll_bar_width from Lisp_Object to integer. Adjust comment. (WINDOW_CONFIG_SCROLL_BAR_WIDTH, WINDOW_CONFIG_SCROLL_BAR_COLS): Adjust users. * window.c (wset_scroll_bar_width): Remove. (make_window): Initialize scroll_bar_width. (Fsplit_window_internal): Use direct assignment. (Fset_window_configuration, save_window_save): Convert Lisp_Object to integer and back where appropriate. (Fset_window_scroll_bars): Adjust user. Return t if any scroll bar was actually changed, and mention this in docstring. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-13 21:17:09 +0000 +++ src/ChangeLog 2013-08-14 04:07:14 +0000 @@ -1,3 +1,17 @@ +2013-08-14 Dmitry Antipov + + * window.h (struct window): Convert scroll_bar_width + from Lisp_Object to integer. Adjust comment. + (WINDOW_CONFIG_SCROLL_BAR_WIDTH, WINDOW_CONFIG_SCROLL_BAR_COLS): + Adjust users. + * window.c (wset_scroll_bar_width): Remove. + (make_window): Initialize scroll_bar_width. + (Fsplit_window_internal): Use direct assignment. + (Fset_window_configuration, save_window_save): + Convert Lisp_Object to integer and back where appropriate. + (Fset_window_scroll_bars): Adjust user. Return t if any scroll + bar was actually changed, and mention this in docstring. + 2013-08-13 Paul Eggert * decompress.c: Minor simplifications. === modified file 'src/window.c' --- src/window.c 2013-08-13 18:01:18 +0000 +++ src/window.c 2013-08-14 04:07:14 +0000 @@ -181,11 +181,6 @@ w->pointm = val; } static void -wset_scroll_bar_width (struct window *w, Lisp_Object val) -{ - w->scroll_bar_width = val; -} -static void wset_start (struct window *w, Lisp_Object val) { w->start = val; @@ -3461,6 +3456,7 @@ w->left_fringe_width = w->right_fringe_width = -1; w->phys_cursor_type = -1; w->phys_cursor_width = -1; + w->scroll_bar_width = -1; w->column_number_displayed = -1; /* Reset window_list. */ @@ -3931,7 +3927,7 @@ n->left_fringe_width = r->left_fringe_width; n->right_fringe_width = r->right_fringe_width; n->fringes_outside_margins = r->fringes_outside_margins; - wset_scroll_bar_width (n, r->scroll_bar_width); + n->scroll_bar_width = r->scroll_bar_width; wset_vertical_scroll_bar_type (n, r->vertical_scroll_bar_type); /* Directly assign orthogonal coordinates and sizes. */ @@ -5674,7 +5670,7 @@ w->left_fringe_width = XINT (p->left_fringe_width); w->right_fringe_width = XINT (p->right_fringe_width); w->fringes_outside_margins = !NILP (p->fringes_outside_margins); - wset_scroll_bar_width (w, p->scroll_bar_width); + w->scroll_bar_width = XINT (p->scroll_bar_width); wset_vertical_scroll_bar_type (w, p->vertical_scroll_bar_type); wset_dedicated (w, p->dedicated); wset_combination_limit (w, p->combination_limit); @@ -5975,7 +5971,7 @@ p->left_fringe_width = make_number (w->left_fringe_width); p->right_fringe_width = make_number (w->right_fringe_width); p->fringes_outside_margins = w->fringes_outside_margins ? Qt : Qnil; - p->scroll_bar_width = w->scroll_bar_width; + p->scroll_bar_width = make_number (w->scroll_bar_width); p->vertical_scroll_bar_type = w->vertical_scroll_bar_type; p->dedicated = w->dedicated; p->combination_limit = w->combination_limit; @@ -6263,18 +6259,17 @@ bar: left, right, or nil. If WIDTH is nil, use the frame's scroll-bar width. If VERTICAL-TYPE is t, use the frame's scroll-bar type. -Fourth parameter HORIZONTAL-TYPE is currently unused. */) - (Lisp_Object window, Lisp_Object width, Lisp_Object vertical_type, Lisp_Object horizontal_type) +Fourth parameter HORIZONTAL-TYPE is currently unused. + +Return t if scroll bars was actually changed and nil otherwise. */) + (Lisp_Object window, Lisp_Object width, + Lisp_Object vertical_type, Lisp_Object horizontal_type) { struct window *w = decode_live_window (window); - - if (!NILP (width)) - { - CHECK_RANGED_INTEGER (width, 0, INT_MAX); - - if (XINT (width) == 0) - vertical_type = Qnil; - } + int iwidth = (NILP (width) ? -1 : (CHECK_NATNUM (width), XINT (width))); + + if (iwidth == 0) + vertical_type = Qnil; if (!(NILP (vertical_type) || EQ (vertical_type, Qleft) @@ -6282,10 +6277,10 @@ || EQ (vertical_type, Qt))) error ("Invalid type of vertical scroll bar"); - if (!EQ (w->scroll_bar_width, width) + if (w->scroll_bar_width != iwidth || !EQ (w->vertical_scroll_bar_type, vertical_type)) { - wset_scroll_bar_width (w, width); + w->scroll_bar_width = iwidth; wset_vertical_scroll_bar_type (w, vertical_type); adjust_window_margins (w); @@ -6295,6 +6290,7 @@ ++windows_or_buffers_changed; adjust_glyphs (XFRAME (WINDOW_FRAME (w))); + return Qt; } return Qnil; === modified file 'src/window.h' --- src/window.h 2013-08-13 15:29:25 +0000 +++ src/window.h 2013-08-14 04:07:14 +0000 @@ -141,10 +141,6 @@ it yet, or if the frame doesn't have any scroll bars, this is nil. */ Lisp_Object vertical_scroll_bar; - /* Pixel width of scroll bars. - A value of nil or t means use frame values. */ - Lisp_Object scroll_bar_width; - /* Type of vertical scroll bar. A value of nil means no scroll bar. A value of t means use frame value. */ Lisp_Object vertical_scroll_bar_type; @@ -269,6 +265,10 @@ int left_margin_cols; int right_margin_cols; + /* Pixel width of scroll bars. + A value of -1 means use frame values. */ + int scroll_bar_width; + /* Non-zero if this window is a minibuffer window. */ unsigned mini : 1; @@ -695,8 +695,7 @@ nonzero. */ #define WINDOW_CONFIG_SCROLL_BAR_WIDTH(w) \ - (INTEGERP (w->scroll_bar_width) \ - ? XFASTINT (w->scroll_bar_width) \ + (w->scroll_bar_width >= 0 ? w->scroll_bar_width \ : FRAME_CONFIG_SCROLL_BAR_WIDTH (WINDOW_XFRAME (w))) /* Width that a scroll bar in window W should have, if there is one. @@ -704,8 +703,8 @@ this is still nonzero. */ #define WINDOW_CONFIG_SCROLL_BAR_COLS(w) \ - (INTEGERP (w->scroll_bar_width) \ - ? ((XFASTINT (w->scroll_bar_width) \ + (w->scroll_bar_width >= 0 \ + ? ((w->scroll_bar_width \ + WINDOW_FRAME_COLUMN_WIDTH (w) - 1) \ / WINDOW_FRAME_COLUMN_WIDTH (w)) \ : FRAME_CONFIG_SCROLL_BAR_COLS (WINDOW_XFRAME (w))) ------------------------------------------------------------ revno: 113860 fixes bug: http://debbugs.gnu.org/15091 author: Ulrich Mueller committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-08-13 22:15:01 -0400 message: * configure.ac (EMACS_CONFIGURATION): Escape backslashes. diff: === modified file 'ChangeLog' --- ChangeLog 2013-08-12 19:48:04 +0000 +++ ChangeLog 2013-08-14 02:15:01 +0000 @@ -1,3 +1,7 @@ +2013-08-14 Ulrich Müller + + * configure.ac (EMACS_CONFIGURATION): Escape backslashes. (Bug#15091) + 2013-08-12 Eli Zaretskii * configure.ac (HAVE_ZLIB): Don't use -lz on MinGW. === modified file 'configure.ac' --- configure.ac 2013-08-12 19:48:04 +0000 +++ configure.ac 2013-08-14 02:15:01 +0000 @@ -4439,7 +4439,7 @@ AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${canonical}", [Define to the canonical Emacs configuration name.]) dnl Replace any embedded " characters (bug#13274). -emacs_config_options=`echo "$emacs_config_options " | sed -e 's/--no-create //' -e 's/--no-recursion //' -e 's/ *$//' -e "s/\"/'/g"` +emacs_config_options=`echo "$emacs_config_options " | sed -e 's/--no-create //' -e 's/--no-recursion //' -e 's/ *$//' -e "s/\"/'/g" -e 's/\\\\/\\\\\\\\/g'` AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${emacs_config_options}", [Define to the options passed to configure.]) AH_TEMPLATE(config_opsysfile, [Some platforms that do not use configure ------------------------------------------------------------ revno: 113859 author: Daniel Hackney committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-08-13 20:56:58 -0400 message: * package-test.el: Remove tar-package-building functions. Tar file used for testing is included in the repository. (package-test-install-texinfo, package-test-cleanup-built-files): Remove. diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2013-08-13 16:36:32 +0000 +++ test/ChangeLog 2013-08-14 00:56:58 +0000 @@ -1,3 +1,10 @@ +2013-08-14 Daniel Hackney + + * package-test.el: Remove tar-package-building functions. Tar file + used for testing is included in the repository. + (package-test-install-texinfo, package-test-cleanup-built-files): + Remove. + 2013-08-13 Fabián Ezequiel Gallina * automated/python-tests.el (python-imenu-create-index-4) === modified file 'test/automated/package-test.el' --- test/automated/package-test.el 2013-07-11 16:01:26 +0000 +++ test/automated/package-test.el 2013-08-14 00:56:58 +0000 @@ -85,9 +85,6 @@ (expand-file-name "archive-contents" package-test-data-dir) "Path to a static copy of \"archive-contents\".") -(defvar package-test-built-file-suffixes '(".tar" "/dir" "/*.info") - "Remove these files when cleaning up a built package.") - (cl-defmacro with-package-test ((&optional &key file basedir install @@ -142,33 +139,6 @@ (let ((help-xref-following t)) ,@body))) -(autoload 'makeinfo-buffer "makeinfo") -(defvar compilation-in-progress) - -(defun package-test-install-texinfo (file) - "Install from texinfo FILE. - -FILE should be a .texinfo file relative to the current -`default-directory'" - (require 'info) - (let* ((full-file (expand-file-name file)) - (info-file (replace-regexp-in-string "\\.texi\\'" ".info" full-file)) - (old-info-defn (symbol-function 'Info-revert-find-node))) - (require 'info) - (setf (symbol-function 'Info-revert-find-node) #'ignore) - (with-current-buffer (find-file-literally full-file) - (unwind-protect - (progn - (makeinfo-buffer) - ;; Give `makeinfo-buffer' a chance to finish - (while compilation-in-progress - (sit-for 0.1)) - (call-process "ginstall-info" nil nil nil - (format "--info-dir=%s" default-directory) - (format "%s" info-file))) - (kill-buffer) - (setf (symbol-function 'Info-revert-find-node) old-info-defn))))) - (defun package-test-strip-version (dir) (replace-regexp-in-string "-pkg\\.el\\'" "" (package--description-file dir))) @@ -178,14 +148,6 @@ '(lambda (item) (file-expand-wildcards (concat base item))) suffix-list)) -(defun package-test-cleanup-built-files (dir) - "Remove files which were the result of creating a tar archive. - -DIR is the base name of the package directory, without the trailing slash" - (let* ((pkg-dirname (file-name-nondirectory dir))) - (dolist (file (package-test-suffix-matches dir package-test-built-file-suffixes)) - (delete-file file)))) - (defvar tar-parse-info) (declare-function tar-header-name "tar-mode" (cl-x) t) ; defstruct ------------------------------------------------------------ revno: 113858 committer: Paul Eggert branch nick: trunk timestamp: Tue 2013-08-13 14:17:09 -0700 message: * decompress.c: Minor simplifications. (Fzlib_decompress_region): Don't bother verifying that avail_out <= UINT_MAX, as that was confusing. Mention the restriction in a comment instead. Prefer 'int' to 'ptrdiff_t' when 'int' is wide enough. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-13 20:18:30 +0000 +++ src/ChangeLog 2013-08-13 21:17:09 +0000 @@ -1,3 +1,11 @@ +2013-08-13 Paul Eggert + + * decompress.c: Minor simplifications. + (Fzlib_decompress_region): Don't bother verifying + that avail_out <= UINT_MAX, as that was confusing. + Mention the restriction in a comment instead. + Prefer 'int' to 'ptrdiff_t' when 'int' is wide enough. + 2013-08-13 Jan Djärv * nsmenu.m (x_activate_menubar): Check for OSX >= 10.5 === modified file 'src/decompress.c' --- src/decompress.c 2013-08-13 16:20:39 +0000 +++ src/decompress.c 2013-08-13 21:17:09 +0000 @@ -183,12 +183,10 @@ { /* Maximum number of bytes that one 'inflate' call should read and write. Do not make avail_out too large, as that might unduly delay C-g. - In any case zlib requires that these values not exceed UINT_MAX. */ + zlib requires that avail_in and avail_out not exceed UINT_MAX. */ ptrdiff_t avail_in = min (iend - pos_byte, UINT_MAX); - enum { avail_out = 1 << 14 }; - verify (avail_out <= UINT_MAX); - - ptrdiff_t decompressed; + int avail_out = 16 * 1024; + int decompressed; if (GAP_SIZE < avail_out) make_gap (avail_out - GAP_SIZE); ------------------------------------------------------------ revno: 113857 committer: Jan D. branch nick: trunk timestamp: Tue 2013-08-13 22:18:30 +0200 message: Fix OSX 10.4 compiler errors. * nsmenu.m (x_activate_menubar): Check for OSX >= 10.5 (trackingNotification:): Call ns_check_menu_open only for OSX >= 10.5. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-13 18:22:04 +0000 +++ src/ChangeLog 2013-08-13 20:18:30 +0000 @@ -1,3 +1,8 @@ +2013-08-13 Jan Djärv + + * nsmenu.m (x_activate_menubar): Check for OSX >= 10.5 + (trackingNotification:): Call ns_check_menu_open only for OSX >= 10.5. + 2013-08-13 Lars Magne Ingebrigtsen * image.c (imagemagick_filename_hint): Check for errors in the === modified file 'src/nsmenu.m' --- src/nsmenu.m 2013-08-11 15:34:26 +0000 +++ src/nsmenu.m 2013-08-13 20:18:30 +0000 @@ -504,9 +504,11 @@ x_activate_menubar (struct frame *f) { #ifdef NS_IMPL_COCOA +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 ns_update_menubar (f, true, nil); ns_check_pending_open_menu (); #endif +#endif } @@ -563,7 +565,9 @@ /* Update menu in menuNeedsUpdate only while tracking menus. */ trackingMenu = ([notification name] == NSMenuDidBeginTrackingNotification ? 1 : 0); +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 if (! trackingMenu) ns_check_menu_open (nil); +#endif } #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 ------------------------------------------------------------ revno: 113856 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Tue 2013-08-13 22:13:02 +0200 message: Rename :content-type to :format in `create-image' diff: === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2013-08-13 17:45:34 +0000 +++ doc/lispref/display.texi 2013-08-13 20:13:02 +0000 @@ -4664,12 +4664,12 @@ wish. @code{:max-width} and @code{:max-height} will always preserve the aspect ratio. -@item :content-type +@item :format ImageMagick tries to auto-detect the image type, but it isn't always -able to. By using @code{:content-type}, we can give ImageMagick a -hint to try to help it. It's used in conjuction with the -@code{image-content-type-suffixes} variable, which provides a mapping -from content types to file name suffixes. This is then given to +able to. By using @code{:format-type}, we can give ImageMagick a hint +to try to help it. It's used in conjuction with the +@code{image-format-suffixes} variable, which provides a mapping from +content types to file name suffixes. This is then given to ImageMagick as a file name hint. @item :rotation === modified file 'etc/NEWS' --- etc/NEWS 2013-08-13 17:45:34 +0000 +++ etc/NEWS 2013-08-13 20:13:02 +0000 @@ -897,8 +897,8 @@ keywords. *** Some data types aren't auto-detected by ImageMagick. Adding -:content-type to `create-image' may help if the content type is in the -new variable `image-content-type-suffixes'. +:format to `create-image' may help if the content type is in the +new variable `image-format-suffixes'. ** Minibuffer === modified file 'lisp/image.el' --- lisp/image.el 2013-08-13 17:45:34 +0000 +++ lisp/image.el 2013-08-13 20:13:02 +0000 @@ -99,11 +99,11 @@ - maybe auto-detect only if the image type is available (see `image-type-available-p').") -(defvar image-content-type-suffixes +(defvar image-format-suffixes '((image/x-icon "ico")) "Alist of MIME Content-Type headers to file name suffixes. This is used as a hint by the ImageMagick library when detecting -image types. If `create-image' is called with a :content-type +image types. If `create-image' is called with a :format matching found in this alist, the ImageMagick library will be told that the data would have this suffix if saved to a file.") === modified file 'lisp/net/shr.el' --- lisp/net/shr.el 2013-08-13 18:09:50 +0000 +++ lisp/net/shr.el 2013-08-13 20:13:02 +0000 @@ -747,7 +747,7 @@ (image (cond ((eq size 'original) (create-image data nil t :ascent 100 - :content-type content-type)) + :format content-type)) ((eq size 'full) (ignore-errors (shr-rescale-image data t content-type))) @@ -791,7 +791,7 @@ (- (nth 2 edges) (nth 0 edges)))) :max-height (truncate (* shr-max-image-proportion (- (nth 3 edges) (nth 1 edges)))) - :content-type content-type)))) + :format content-type)))) ;; url-cache-extract autoloads url-cache. (declare-function url-cache-create-filename "url-cache" (url)) === modified file 'src/image.c' --- src/image.c 2013-08-13 18:24:37 +0000 +++ src/image.c 2013-08-13 20:13:02 +0000 @@ -551,7 +551,6 @@ static Lisp_Object QCcolor_symbols; static Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask, QCgeometry; static Lisp_Object QCcrop, QCrotation; -static Lisp_Object QCcontent_type; /* Other symbols. */ @@ -7741,7 +7740,7 @@ IMAGEMAGICK_WIDTH, IMAGEMAGICK_MAX_HEIGHT, IMAGEMAGICK_MAX_WIDTH, - IMAGEMAGICK_CONTENT_TYPE, + IMAGEMAGICK_FORMAT, IMAGEMAGICK_ROTATION, IMAGEMAGICK_CROP, IMAGEMAGICK_LAST @@ -7766,7 +7765,7 @@ {":width", IMAGE_INTEGER_VALUE, 0}, {":max-height", IMAGE_INTEGER_VALUE, 0}, {":max-width", IMAGE_INTEGER_VALUE, 0}, - {":content-type", IMAGE_SYMBOL_VALUE, 0}, + {":format", IMAGE_SYMBOL_VALUE, 0}, {":rotation", IMAGE_NUMBER_VALUE, 0}, {":crop", IMAGE_DONT_CHECK_VALUE_TYPE, 0} }; @@ -7851,15 +7850,15 @@ static char* imagemagick_filename_hint (Lisp_Object spec) { - Lisp_Object content_type = image_spec_value (spec, QCcontent_type, NULL); - Lisp_Object symbol = intern ("image-content-type-suffixes"); + Lisp_Object format = image_spec_value (spec, intern (":format"), NULL); + Lisp_Object symbol = intern ("image-format-suffixes"); Lisp_Object val; char *name, *prefix = "/tmp/foo."; if (NILP (Fboundp (symbol))) return NULL; - val = Fassq (content_type, Fsymbol_value (symbol)); + val = Fassq (format, Fsymbol_value (symbol)); if (! CONSP (val)) return NULL; @@ -9155,7 +9154,6 @@ DEFSYM (Qpostscript, "postscript"); DEFSYM (QCmax_width, ":max-width"); DEFSYM (QCmax_height, ":max-height"); - DEFSYM (QCcontent_type, ":content-type"); #ifdef HAVE_GHOSTSCRIPT ADD_IMAGE_TYPE (Qpostscript); DEFSYM (QCloader, ":loader"); ------------------------------------------------------------ revno: 113855 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Tue 2013-08-13 20:24:37 +0200 message: White-space cleanup. diff: === modified file 'src/image.c' --- src/image.c 2013-08-13 18:22:04 +0000 +++ src/image.c 2013-08-13 18:24:37 +0000 @@ -7866,7 +7866,7 @@ val = Fcdr (val); if (! CONSP (val)) return NULL; - + val = Fcar (val); if (! STRINGP (val)) return NULL; ------------------------------------------------------------ revno: 113854 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Tue 2013-08-13 20:22:04 +0200 message: * image.c (imagemagick_filename_hint): Check for errors in the alist structure. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-13 18:01:18 +0000 +++ src/ChangeLog 2013-08-13 18:22:04 +0000 @@ -1,3 +1,8 @@ +2013-08-13 Lars Magne Ingebrigtsen + + * image.c (imagemagick_filename_hint): Check for errors in the + alist structure. + 2013-08-13 Eli Zaretskii * window.c (Fwindow_margins): Return nil when there's no marginal === modified file 'src/image.c' --- src/image.c 2013-08-13 17:45:34 +0000 +++ src/image.c 2013-08-13 18:22:04 +0000 @@ -7853,19 +7853,27 @@ { Lisp_Object content_type = image_spec_value (spec, QCcontent_type, NULL); Lisp_Object symbol = intern ("image-content-type-suffixes"); - Lisp_Object suffix; + Lisp_Object val; char *name, *prefix = "/tmp/foo."; if (NILP (Fboundp (symbol))) return NULL; - suffix = Fcar (Fcdr (Fassq (content_type, Fsymbol_value (symbol)))); - if (! STRINGP (suffix)) - return NULL; - - name = xmalloc (strlen (prefix) + SBYTES (suffix) + 1); + val = Fassq (content_type, Fsymbol_value (symbol)); + if (! CONSP (val)) + return NULL; + + val = Fcdr (val); + if (! CONSP (val)) + return NULL; + + val = Fcar (val); + if (! STRINGP (val)) + return NULL; + + name = xmalloc (strlen (prefix) + SBYTES (val) + 1); strcpy(name, prefix); - strcat(name, SDATA (suffix)); + strcat(name, SDATA (val)); return name; } ------------------------------------------------------------ revno: 113853 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Tue 2013-08-13 20:09:50 +0200 message: Make shr feed Content-Type to the image-creating libraries This finally makes it possible to display icons. * net/eww.el (eww-display-image): Ditto. * net/shr.el (shr-parse-image-data): New function to grab both the data itself and the Content-Type. (shr-put-image): Use it. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-13 17:45:34 +0000 +++ lisp/ChangeLog 2013-08-13 18:09:50 +0000 @@ -1,5 +1,11 @@ 2013-08-13 Lars Magne Ingebrigtsen + * net/shr.el (shr-parse-image-data): New function to grab both the + data itself and the Content-Type. + (shr-put-image): Use it. + + * net/eww.el (eww-display-image): Ditto. + * image.el (image-content-type-suffixes): New variable. 2013-08-13 Fabián Ezequiel Gallina === modified file 'lisp/net/eww.el' --- lisp/net/eww.el 2013-08-11 21:51:10 +0000 +++ lisp/net/eww.el 2013-08-13 18:09:50 +0000 @@ -304,7 +304,7 @@ (goto-char (point-min)))) (defun eww-display-image () - (let ((data (buffer-substring (point) (point-max)))) + (let ((data (shr-parse-image-data))) (eww-setup-buffer) (let ((inhibit-read-only t)) (shr-put-image data nil)) === modified file 'lisp/net/shr.el' --- lisp/net/shr.el 2013-08-13 07:18:50 +0000 +++ lisp/net/shr.el 2013-08-13 18:09:50 +0000 @@ -705,7 +705,7 @@ (url-store-in-cache image-buffer) (when (or (search-forward "\n\n" nil t) (search-forward "\r\n\r\n" nil t)) - (let ((data (buffer-substring (point) (point-max)))) + (let ((data (shr-parse-image-data))) (with-current-buffer buffer (save-excursion (let ((alt (buffer-substring start end)) @@ -732,20 +732,28 @@ (setq payload (base64-decode-string payload))) payload))) -(defun shr-put-image (data alt &optional flags) - "Put image DATA with a string ALT. Return image." +(defun shr-put-image (spec alt &optional flags) + "Insert image SPEC with a string ALT. Return image. +SPEC is either an image data blob, or a list where the first +element is the data blob and the second element is the content-type." (if (display-graphic-p) (let* ((size (cdr (assq 'size flags))) + (data (if (consp spec) + (car spec) + spec)) + (content-type (and (consp spec) + (cadr spec))) (start (point)) (image (cond ((eq size 'original) - (create-image data nil t :ascent 100)) + (create-image data nil t :ascent 100 + :content-type content-type)) ((eq size 'full) (ignore-errors - (shr-rescale-image data t))) + (shr-rescale-image data t content-type))) (t (ignore-errors - (shr-rescale-image data)))))) + (shr-rescale-image data nil content-type)))))) (when image ;; When inserting big-ish pictures, put them at the ;; beginning of the line. @@ -767,7 +775,7 @@ image) (insert alt))) -(defun shr-rescale-image (data &optional force) +(defun shr-rescale-image (data &optional force content-type) "Rescale DATA, if too big, to fit the current buffer. If FORCE, rescale the image anyway." (if (or (not (fboundp 'imagemagick-types)) @@ -782,7 +790,8 @@ :max-width (truncate (* shr-max-image-proportion (- (nth 2 edges) (nth 0 edges)))) :max-height (truncate (* shr-max-image-proportion - (- (nth 3 edges) (nth 1 edges)))))))) + (- (nth 3 edges) (nth 1 edges)))) + :content-type content-type)))) ;; url-cache-extract autoloads url-cache. (declare-function url-cache-create-filename "url-cache" (url)) @@ -799,7 +808,17 @@ t) (when (or (search-forward "\n\n" nil t) (search-forward "\r\n\r\n" nil t)) - (buffer-substring (point) (point-max)))))) + (shr-parse-image-data))))) + +(defun shr-parse-image-data () + (list + (buffer-substring (point) (point-max)) + (save-excursion + (save-restriction + (narrow-to-region (point-min) (point)) + (let ((content-type (mail-fetch-field "content-type"))) + (and content-type + (intern content-type obarray))))))) (defun shr-image-displayer (content-function) "Return a function to display an image. ------------------------------------------------------------ revno: 113852 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2013-08-13 21:01:18 +0300 message: Fix the Windows build broken by revision 113846. src/window.c (Fwindow_margins): Return nil when there's no marginal area, as per the documented API. src/w32term.c (x_scroll_bar_create): Use ALLOCATE_PSEUDOVECTOR, not Fmake_vector, as scroll bar's struct members are not all Lisp objects now. This avoids crashes in GC. src/w32term.h (struct scroll_bar): Convert fringe_extended_p to a bool, so its address could be taken. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-13 17:45:34 +0000 +++ src/ChangeLog 2013-08-13 18:01:18 +0000 @@ -1,3 +1,15 @@ +2013-08-13 Eli Zaretskii + + * window.c (Fwindow_margins): Return nil when there's no marginal + area, as per the documented API. + + * w32term.c (x_scroll_bar_create): Use ALLOCATE_PSEUDOVECTOR, not + Fmake_vector, as scroll bar's struct members are not all Lisp + objects now. This avoids crashes in GC. + + * w32term.h (struct scroll_bar): Convert fringe_extended_p to a + bool, so its address could be taken. + 2013-08-13 Lars Magne Ingebrigtsen * image.c (imagemagick_filename_hint): New function to possibly === modified file 'src/w32term.c' --- src/w32term.c 2013-08-13 15:29:25 +0000 +++ src/w32term.c 2013-08-13 18:01:18 +0000 @@ -3757,7 +3757,7 @@ HWND hwnd; SCROLLINFO si; struct scroll_bar *bar - = XSCROLL_BAR (Fmake_vector (make_number (VECSIZE (struct scroll_bar)), Qnil)); + = ALLOCATE_PSEUDOVECTOR (struct scroll_bar, fringe_extended_p, PVEC_OTHER); Lisp_Object barobj; block_input (); === modified file 'src/w32term.h' --- src/w32term.h 2013-08-13 15:29:25 +0000 +++ src/w32term.h 2013-08-13 18:01:18 +0000 @@ -453,7 +453,9 @@ /* 1 if the background of the fringe that is adjacent to a scroll bar is extended to the gap between the fringe and the bar. */ - unsigned fringe_extended_p : 1; + /* Note: this could be a bit field, but we need to take its address + in ALLOCATE_PSEUDOVECTOR (see x_scroll_bar_create). */ + bool fringe_extended_p; }; /* Turning a lisp vector value into a pointer to a struct scroll_bar. */ === modified file 'src/window.c' --- src/window.c 2013-08-13 14:45:58 +0000 +++ src/window.c 2013-08-13 18:01:18 +0000 @@ -6171,8 +6171,8 @@ (Lisp_Object window) { struct window *w = decode_live_window (window); - return Fcons (make_number (w->left_margin_cols), - make_number (w->right_margin_cols)); + return Fcons (w->left_margin_cols ? make_number (w->left_margin_cols) : Qnil, + w->right_margin_cols ? make_number (w->right_margin_cols) : Qnil); } ------------------------------------------------------------ revno: 113851 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Tue 2013-08-13 19:45:34 +0200 message: Enable giving hints to ImageMagick via :content-type 2013-08-13 Lars Magne Ingebrigtsen * image.el (image-content-type-suffixes): New variable. 2013-08-13 Lars Magne Ingebrigtsen * image.c (imagemagick_filename_hint): New function to possibly apply `image-content-type-suffixes'. (imagemagick_load_image): Use it. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-08-13 14:26:39 +0000 +++ doc/lispref/ChangeLog 2013-08-13 17:45:34 +0000 @@ -1,3 +1,8 @@ +2013-08-13 Lars Magne Ingebrigtsen + + * display.texi (ImageMagick Images): Mention :content-type and + `image-content-type-suffixes'. + 2013-08-13 Xue Fuqiao * positions.texi (Word Motion): Remove redundant sentence. === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2013-08-07 02:25:52 +0000 +++ doc/lispref/display.texi 2013-08-13 17:45:34 +0000 @@ -4664,6 +4664,14 @@ wish. @code{:max-width} and @code{:max-height} will always preserve the aspect ratio. +@item :content-type +ImageMagick tries to auto-detect the image type, but it isn't always +able to. By using @code{:content-type}, we can give ImageMagick a +hint to try to help it. It's used in conjuction with the +@code{image-content-type-suffixes} variable, which provides a mapping +from content types to file name suffixes. This is then given to +ImageMagick as a file name hint. + @item :rotation Specifies a rotation angle in degrees. === modified file 'etc/NEWS' --- etc/NEWS 2013-08-12 17:02:31 +0000 +++ etc/NEWS 2013-08-13 17:45:34 +0000 @@ -896,6 +896,10 @@ *** ImageMagick images now support the :max-width and :max-height keywords. +*** Some data types aren't auto-detected by ImageMagick. Adding +:content-type to `create-image' may help if the content type is in the +new variable `image-content-type-suffixes'. + ** Minibuffer *** In minibuffer filename prompts, `C-M-f' and `C-M-b' now move to the === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-13 16:36:32 +0000 +++ lisp/ChangeLog 2013-08-13 17:45:34 +0000 @@ -1,3 +1,7 @@ +2013-08-13 Lars Magne Ingebrigtsen + + * image.el (image-content-type-suffixes): New variable. + 2013-08-13 Fabián Ezequiel Gallina * progmodes/python.el (python-imenu--build-tree) === modified file 'lisp/image.el' --- lisp/image.el 2013-05-30 03:24:30 +0000 +++ lisp/image.el 2013-08-13 17:45:34 +0000 @@ -99,6 +99,14 @@ - maybe auto-detect only if the image type is available (see `image-type-available-p').") +(defvar image-content-type-suffixes + '((image/x-icon "ico")) + "Alist of MIME Content-Type headers to file name suffixes. +This is used as a hint by the ImageMagick library when detecting +image types. If `create-image' is called with a :content-type +matching found in this alist, the ImageMagick library will be +told that the data would have this suffix if saved to a file.") + (defcustom image-load-path (list (file-name-as-directory (expand-file-name "images" data-directory)) 'data-directory 'load-path) === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-13 16:20:39 +0000 +++ src/ChangeLog 2013-08-13 17:45:34 +0000 @@ -1,3 +1,9 @@ +2013-08-13 Lars Magne Ingebrigtsen + + * image.c (imagemagick_filename_hint): New function to possibly + apply `image-content-type-suffixes'. + (imagemagick_load_image): Use it. + 2013-08-13 Eli Zaretskii * decompress.c (Fzlib_decompress_region) [WINDOWSNT]: Return Qnil === modified file 'src/image.c' --- src/image.c 2013-08-11 01:30:20 +0000 +++ src/image.c 2013-08-13 17:45:34 +0000 @@ -551,6 +551,7 @@ static Lisp_Object QCcolor_symbols; static Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask, QCgeometry; static Lisp_Object QCcrop, QCrotation; +static Lisp_Object QCcontent_type; /* Other symbols. */ @@ -7740,6 +7741,7 @@ IMAGEMAGICK_WIDTH, IMAGEMAGICK_MAX_HEIGHT, IMAGEMAGICK_MAX_WIDTH, + IMAGEMAGICK_CONTENT_TYPE, IMAGEMAGICK_ROTATION, IMAGEMAGICK_CROP, IMAGEMAGICK_LAST @@ -7764,6 +7766,7 @@ {":width", IMAGE_INTEGER_VALUE, 0}, {":max-height", IMAGE_INTEGER_VALUE, 0}, {":max-width", IMAGE_INTEGER_VALUE, 0}, + {":content-type", IMAGE_SYMBOL_VALUE, 0}, {":rotation", IMAGE_NUMBER_VALUE, 0}, {":crop", IMAGE_DONT_CHECK_VALUE_TYPE, 0} }; @@ -7842,6 +7845,30 @@ description = (char *) MagickRelinquishMemory (description); } +/* Possibly give ImageMagick some extra help to determine the image + type by supplying a "dummy" filename based on the Content-Type. */ + +static char* +imagemagick_filename_hint (Lisp_Object spec) +{ + Lisp_Object content_type = image_spec_value (spec, QCcontent_type, NULL); + Lisp_Object symbol = intern ("image-content-type-suffixes"); + Lisp_Object suffix; + char *name, *prefix = "/tmp/foo."; + + if (NILP (Fboundp (symbol))) + return NULL; + + suffix = Fcar (Fcdr (Fassq (content_type, Fsymbol_value (symbol)))); + if (! STRINGP (suffix)) + return NULL; + + name = xmalloc (strlen (prefix) + SBYTES (suffix) + 1); + strcpy(name, prefix); + strcat(name, SDATA (suffix)); + return name; +} + /* Helper function for imagemagick_load, which does the actual loading given contents and size, apart from frame and image structures, passed from imagemagick_load. Uses librimagemagick to do most of @@ -7875,6 +7902,7 @@ int desired_width, desired_height; double rotation; int pixelwidth; + char *filename_hint = NULL; /* Handle image index for image types who can contain more than one image. Interface :index is same as for GIF. First we "ping" the image to see how @@ -7888,6 +7916,12 @@ ping_wand = NewMagickWand (); /* MagickSetResolution (ping_wand, 2, 2); (Bug#10112) */ + if (! filename) + filename_hint = imagemagick_filename_hint (img->spec); + + if (filename_hint) + MagickSetFilename (ping_wand, filename_hint); + status = filename ? MagickPingImage (ping_wand, filename) : MagickPingImageBlob (ping_wand, contents, size); @@ -7920,6 +7954,9 @@ image_wand = NewMagickWand (); + if (filename_hint) + MagickSetFilename (image_wand, filename_hint); + if ((filename ? MagickReadImage (image_wand, filename) : MagickReadImageBlob (image_wand, contents, size)) @@ -8163,11 +8200,16 @@ /* `MagickWandTerminus' terminates the imagemagick environment. */ MagickWandTerminus (); + if (filename_hint) + free (filename_hint); + return 1; imagemagick_error: DestroyMagickWand (image_wand); if (bg_wand) DestroyPixelWand (bg_wand); + if (filename_hint) + free (filename_hint); MagickWandTerminus (); /* TODO more cleanup. */ @@ -9105,6 +9147,7 @@ DEFSYM (Qpostscript, "postscript"); DEFSYM (QCmax_width, ":max-width"); DEFSYM (QCmax_height, ":max-height"); + DEFSYM (QCcontent_type, ":content-type"); #ifdef HAVE_GHOSTSCRIPT ADD_IMAGE_TYPE (Qpostscript); DEFSYM (QCloader, ":loader"); ------------------------------------------------------------ revno: 113850 committer: Fabián Ezequiel Gallina branch nick: trunk timestamp: Tue 2013-08-13 13:36:32 -0300 message: * lisp/progmodes/python.el (python-imenu--build-tree) (python-imenu--put-parent): Simplify and Fix (GH bug 146). * test/automated/python-tests.el (python-imenu-create-index-4) (python-imenu-create-flat-index-2): New tests. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-13 14:26:39 +0000 +++ lisp/ChangeLog 2013-08-13 16:36:32 +0000 @@ -1,3 +1,8 @@ +2013-08-13 Fabián Ezequiel Gallina + + * progmodes/python.el (python-imenu--build-tree) + (python-imenu--put-parent): Simplify and Fix (GH bug 146). + 2013-08-13 Xue Fuqiao * simple.el (backward-word): Mention the optional argument. === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2013-07-13 01:55:58 +0000 +++ lisp/progmodes/python.el 2013-08-13 16:36:32 +0000 @@ -3042,32 +3042,22 @@ "*class definition*" "*function definition*")) -(defun python-imenu--put-parent (type name pos num-children tree &optional root) - "Add the parent with TYPE, NAME, POS and NUM-CHILDREN to TREE. -Optional Argument ROOT must be non-nil when the node being -processed is the root of the TREE." +(defun python-imenu--put-parent (type name pos tree) + "Add the parent with TYPE, NAME and POS to TREE." (let ((label (funcall python-imenu-format-item-label-function type name)) (jump-label (funcall python-imenu-format-parent-item-jump-label-function type name))) - (if root - ;; This is the root, everything is a children. - (cons label (cons (cons jump-label pos) tree)) - ;; This is node a which may contain some children. - (cons - (cons label (cons (cons jump-label pos) - ;; Append all the children - (python-util-popn tree num-children))) - ;; All previous non-children nodes. - (nthcdr num-children tree))))) + (if (not tree) + (cons label pos) + (cons label (cons (cons jump-label pos) tree))))) -(defun python-imenu--build-tree (&optional min-indent prev-indent num-children tree) +(defun python-imenu--build-tree (&optional min-indent prev-indent tree) "Recursively build the tree of nested definitions of a node. -Arguments MIN-INDENT PREV-INDENT NUM-CHILDREN and TREE are -internal and should not be passed explicitly unless you know what -you are doing." - (setq num-children (or num-children 0) - min-indent (or min-indent 0)) +Arguments MIN-INDENT PREV-INDENT and TREE are internal and should +not be passed explicitly unless you know what you are doing." + (setq min-indent (or min-indent 0) + prev-indent (or prev-indent python-indent-offset)) (let* ((pos (python-nav-backward-defun)) (type) (name (when (and pos (looking-at python-nav-beginning-of-defun-regexp)) @@ -3076,73 +3066,33 @@ (cadr split)))) (label (when name (funcall python-imenu-format-item-label-function type name))) - (indent (current-indentation))) + (indent (current-indentation)) + (children-indent-limit (+ python-indent-offset min-indent))) (cond ((not pos) - ;; No defun found, nothing to add. - tree) - ((equal indent 0) - (if (> num-children 0) - ;; Append it as the parent of everything collected to - ;; this point. - (python-imenu--put-parent type name pos num-children tree t) - ;; There are no children, this is a lonely defun. - (cons label pos))) - ((equal min-indent indent) - ;; Stop collecting nodes after moving to a position with - ;; indentation equaling min-indent. This is specially - ;; useful for navigating nested definitions recursively. - (if (> num-children 0) - tree - ;; When there are no children, the collected tree is a - ;; single node intended to be added in the list of defuns - ;; of its parent. - (car tree))) + ;; Nothing found, probably near to bobp. + nil) + ((<= indent min-indent) + ;; The current indentation points that this is a parent + ;; node, add it to the tree and stop recursing. + (python-imenu--put-parent type name pos tree)) (t (python-imenu--build-tree min-indent indent - ;; Add another children, either when this is the - ;; first call or when indentation is - ;; less-or-equal than previous. And do not - ;; discard the number of children, because the - ;; way code is scanned, all children are - ;; collected until a root node yet to be found - ;; appears. - (if (or (not prev-indent) - (and - (> indent min-indent) - (<= indent prev-indent))) - (1+ num-children) - num-children) - (cond ((not prev-indent) - ;; First call to the function: append this - ;; defun to the index. - (list (cons label pos))) - ((= indent prev-indent) - ;; Add another defun with the same depth - ;; as the previous. - (cons (cons label pos) tree)) - ((and (< indent prev-indent) - (< 0 num-children)) - ;; There are children to be appended and - ;; the previous defun had more - ;; indentation, the current one must be a - ;; parent. - (python-imenu--put-parent type name pos num-children tree)) - ((> indent prev-indent) - ;; There are children defuns deeper than - ;; current depth. Fear not, we already - ;; know how to treat them. - (cons - (prog1 - (python-imenu--build-tree - prev-indent indent 0 (list (cons label pos))) - ;; Adjustment: after scanning backwards - ;; for all deeper children, we need to - ;; continue our scan for a parent from - ;; the current defun we are looking at. - (python-nav-forward-defun)) - tree)))))))) + (if (<= indent children-indent-limit) + ;; This lays within the children indent offset range, + ;; so it's a normal children of its parent (i.e., not + ;; a children of a children). + (cons (cons label pos) tree) + ;; Oh noes, a children of a children?!. Fear not, we + ;; know how to roll. We recursely parse these by + ;; swapping prev-indent and min-indent plus adding this + ;; newly found item to a fresh subtree. This works, I + ;; promise. + (cons + (python-imenu--build-tree + prev-indent indent (list (cons label pos))) + tree))))))) (defun python-imenu-create-index () "Return tree Imenu alist for the current python buffer. === modified file 'test/ChangeLog' --- test/ChangeLog 2013-08-12 00:09:11 +0000 +++ test/ChangeLog 2013-08-13 16:36:32 +0000 @@ -1,3 +1,8 @@ +2013-08-13 Fabián Ezequiel Gallina + + * automated/python-tests.el (python-imenu-create-index-4) + (python-imenu-create-flat-index-2): New tests. + 2013-08-05 Glenn Morris * automated/mule-util.el: New file, with tests extracted from === modified file 'test/automated/python-tests.el' --- test/automated/python-tests.el 2013-07-13 01:55:58 +0000 +++ test/automated/python-tests.el 2013-08-13 16:36:32 +0000 @@ -1792,6 +1792,34 @@ (cons "foo2 (def)" (copy-marker 77))))) (python-imenu-create-index))))) +(ert-deftest python-imenu-create-index-4 () + (python-tests-with-temp-buffer + " +class Foo(object): + class Bar(object): + def __init__(self): + pass + + def __str__(self): + pass + + def __init__(self): + pass +" + (goto-char (point-max)) + (should (equal + (list + (list + "Foo (class)" + (cons "*class definition*" (copy-marker 2)) + (list + "Bar (class)" + (cons "*class definition*" (copy-marker 21)) + (cons "__init__ (def)" (copy-marker 44)) + (cons "__str__ (def)" (copy-marker 90))) + (cons "__init__ (def)" (copy-marker 135)))) + (python-imenu-create-index))))) + (ert-deftest python-imenu-create-flat-index-1 () (python-tests-with-temp-buffer " @@ -1851,6 +1879,30 @@ (cons "Baz.Frob.c" (copy-marker 626))) (python-imenu-create-flat-index))))) +(ert-deftest python-imenu-create-flat-index-2 () + (python-tests-with-temp-buffer + " +class Foo(object): + class Bar(object): + def __init__(self): + pass + + def __str__(self): + pass + + def __init__(self): + pass +" + (goto-char (point-max)) + (should (equal + (list + (cons "Foo" (copy-marker 2)) + (cons "Foo.Bar" (copy-marker 21)) + (cons "Foo.Bar.__init__" (copy-marker 44)) + (cons "Foo.Bar.__str__" (copy-marker 90)) + (cons "Foo.__init__" (copy-marker 135))) + (python-imenu-create-flat-index))))) + ;;; Misc helpers ------------------------------------------------------------ revno: 113849 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2013-08-13 19:20:39 +0300 message: Fail zlib-decompress-region if loading zlib on Windows failed. src/decompress.c (Fzlib_decompress_region) [WINDOWSNT]: Return Qnil if loading zlib failed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-13 15:45:43 +0000 +++ src/ChangeLog 2013-08-13 16:20:39 +0000 @@ -1,3 +1,8 @@ +2013-08-13 Eli Zaretskii + + * decompress.c (Fzlib_decompress_region) [WINDOWSNT]: Return Qnil + if loading zlib failed. + 2013-08-13 Jan Djärv * nsterm.m (ns_set_vertical_scroll_bar): Fix breakage intruduced by === modified file 'src/decompress.c' --- src/decompress.c 2013-08-13 15:00:58 +0000 +++ src/decompress.c 2013-08-13 16:20:39 +0000 @@ -146,6 +146,8 @@ #ifdef WINDOWSNT if (!zlib_initialized) zlib_initialized = init_zlib_functions (); + if (!zlib_initialized) + return Qnil; #endif /* This is a unibyte buffer, so character positions and bytes are ------------------------------------------------------------ revno: 113848 committer: Jan D. branch nick: trunk timestamp: Tue 2013-08-13 17:45:43 +0200 message: Fix NS compile breakage. * nsterm.m (ns_set_vertical_scroll_bar): Fix breakage intruduced by 2013-08-13 checkin below. Change bool to BOOL, rule is: All Obj-C code uses BOOL, except for interfaces callable from C. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-13 15:39:14 +0000 +++ src/ChangeLog 2013-08-13 15:45:43 +0000 @@ -1,5 +1,9 @@ 2013-08-13 Jan Djärv + * nsterm.m (ns_set_vertical_scroll_bar): Fix breakage intruduced by + 2013-08-13 checkin below. Change bool to BOOL, rule is: + All Obj-C code uses BOOL, except for interfaces callable from C. + * nsterm.h: Fix CGFloat for OSX 10.4 (Bug#15086). 2013-08-13 Dmitry Antipov === modified file 'src/nsterm.m' --- src/nsterm.m 2013-08-13 15:29:25 +0000 +++ src/nsterm.m 2013-08-13 15:45:43 +0000 @@ -3703,7 +3703,7 @@ int window_y, window_height; int top, left, height, width, sb_width, sb_left; EmacsScroller *bar; - bool fringe_extended_p; + BOOL fringe_extended_p; /* optimization; display engine sends WAY too many of these.. */ if (!NILP (window->vertical_scroll_bar)) @@ -3740,7 +3740,7 @@ v = [view frame]; r.origin.y = (v.size.height - r.size.height - r.origin.y); - fringe_extended_p = WINDOW_FRINGE_EXTENDED_P (w); + fringe_extended_p = WINDOW_FRINGE_EXTENDED_P (window); XSETWINDOW (win, window); block_input (); ------------------------------------------------------------ revno: 113847 fixes bug: http://debbugs.gnu.org/15086 committer: Jan D. branch nick: trunk timestamp: Tue 2013-08-13 17:39:14 +0200 message: * nsterm.h: Fix CGFloat for OSX 10.4. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-13 15:29:25 +0000 +++ src/ChangeLog 2013-08-13 15:39:14 +0000 @@ -1,3 +1,7 @@ +2013-08-13 Jan Djärv + + * nsterm.h: Fix CGFloat for OSX 10.4 (Bug#15086). + 2013-08-13 Dmitry Antipov * window.h (WINDOW_FRINGE_EXTENDED_P): New macro. === modified file 'src/nsterm.h' --- src/nsterm.h 2013-08-11 15:34:26 +0000 +++ src/nsterm.h 2013-08-13 15:39:14 +0000 @@ -53,9 +53,24 @@ /* CGFloat on GNUStep may be 4 or 8 byte, but functions expect float* for some versions. - On Cocoa, functions expect CGFloat*. Make compatible type. */ -#if defined (NS_IMPL_COCOA) || GNUSTEP_GUI_MAJOR_VERSION > 0 || \ - GNUSTEP_GUI_MINOR_VERSION >= 22 + On Cocoa >= 10.5, functions expect CGFloat*. Make compatible type. */ +#ifdef NS_IMPL_COCOA + +#ifndef NS_HAVE_NSINTEGER +#if defined (__LP64__) && __LP64__ +typedef double CGFloat; +typedef long NSInteger; +typedef unsigned long NSUInteger; +#else +typedef float CGFloat; +typedef int NSInteger; +typedef unsigned int NSUInteger; +#endif /* not LP64 */ +#endif /* not NS_HAVE_NSINTEGER */ + +typedef CGFloat EmacsCGFloat; + +#elif GNUSTEP_GUI_MAJOR_VERSION > 0 || GNUSTEP_GUI_MINOR_VERSION >= 22 typedef CGFloat EmacsCGFloat; #else typedef float EmacsCGFloat; @@ -424,18 +439,6 @@ @end #endif -#ifndef NS_HAVE_NSINTEGER -#if defined (__LP64__) && __LP64__ -typedef double CGFloat; -typedef long NSInteger; -typedef unsigned long NSUInteger; -#else -typedef float CGFloat; -typedef int NSInteger; -typedef unsigned int NSUInteger; -#endif /* not LP64 */ -#endif /* not NS_HAVE_NSINTEGER */ - #endif /* __OBJC__ */ ------------------------------------------------------------ revno: 113846 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-08-13 19:29:25 +0400 message: * window.h (WINDOW_FRINGE_EXTENDED_P): New macro. * nsterm.m (ns_set_vertical_scroll_bar): Use it. Use convenient bool instead of BOOL. * w32term.h (struct scroll_bar): Convert fringe_extended_p from Lisp_Object to bitfield. Adjust comment. * w32term.c (x_scroll_bar_create): Adjust user. Use WINDOW_FRINGE_EXTENDED_P and bool for boolean. * xterm.c (XTset_vertical_scroll_bar): Likewise. Use bool for boolean. * xterm.h (struct scroll_bar): Prefer commonly used `unsigned' to `unsigned int' when defining a bitfield. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-13 15:00:58 +0000 +++ src/ChangeLog 2013-08-13 15:29:25 +0000 @@ -1,3 +1,17 @@ +2013-08-13 Dmitry Antipov + + * window.h (WINDOW_FRINGE_EXTENDED_P): New macro. + * nsterm.m (ns_set_vertical_scroll_bar): Use it. Use convenient + bool instead of BOOL. + * w32term.h (struct scroll_bar): Convert fringe_extended_p + from Lisp_Object to bitfield. Adjust comment. + * w32term.c (x_scroll_bar_create): Adjust user. + Use WINDOW_FRINGE_EXTENDED_P and bool for boolean. + * xterm.c (XTset_vertical_scroll_bar): Likewise. + Use bool for boolean. + * xterm.h (struct scroll_bar): Prefer commonly used `unsigned' + to `unsigned int' when defining a bitfield. + 2013-08-13 Paul Eggert * decompress.c (Fzlib_decompress_region): Try to clarify 'avail_out'. === modified file 'src/nsterm.m' --- src/nsterm.m 2013-08-11 14:57:12 +0000 +++ src/nsterm.m 2013-08-13 15:29:25 +0000 @@ -3703,7 +3703,7 @@ int window_y, window_height; int top, left, height, width, sb_width, sb_left; EmacsScroller *bar; - BOOL fringe_extended_p; + bool fringe_extended_p; /* optimization; display engine sends WAY too many of these.. */ if (!NILP (window->vertical_scroll_bar)) @@ -3740,16 +3740,7 @@ v = [view frame]; r.origin.y = (v.size.height - r.size.height - r.origin.y); - if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (window)) - fringe_extended_p = (WINDOW_LEFTMOST_P (window) - && WINDOW_LEFT_FRINGE_WIDTH (window) - && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (window) - || WINDOW_LEFT_MARGIN_COLS (window) == 0)); - else - fringe_extended_p = (WINDOW_RIGHTMOST_P (window) - && WINDOW_RIGHT_FRINGE_WIDTH (window) - && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (window) - || WINDOW_RIGHT_MARGIN_COLS (window) == 0)); + fringe_extended_p = WINDOW_FRINGE_EXTENDED_P (w); XSETWINDOW (win, window); block_input (); === modified file 'src/w32term.c' --- src/w32term.c 2013-08-08 14:51:07 +0000 +++ src/w32term.c 2013-08-13 15:29:25 +0000 @@ -3770,7 +3770,7 @@ XSETINT (bar->start, 0); XSETINT (bar->end, 0); bar->dragging = Qnil; - bar->fringe_extended_p = Qnil; + bar->fringe_extended_p = 0; /* Requires geometry to be set before call to create the real window */ @@ -3834,7 +3834,7 @@ struct scroll_bar *bar; int top, height, left, sb_left, width, sb_width; int window_y, window_height; - int fringe_extended_p; + bool fringe_extended_p; /* Get window dimensions. */ window_box (w, -1, 0, &window_y, 0, &window_height); @@ -3858,16 +3858,7 @@ else sb_left = left + (WINDOW_LEFTMOST_P (w) ? 0 : width - sb_width); - if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)) - fringe_extended_p = (WINDOW_LEFTMOST_P (w) - && WINDOW_LEFT_FRINGE_WIDTH (w) - && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) - || WINDOW_LEFT_MARGIN_COLS (w) == 0)); - else - fringe_extended_p = (WINDOW_RIGHTMOST_P (w) - && WINDOW_RIGHT_FRINGE_WIDTH (w) - && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) - || WINDOW_RIGHT_MARGIN_COLS (w) == 0)); + fringe_extended_p = WINDOW_FRINGE_EXTENDED_P (w); /* Does the scroll bar exist yet? */ if (NILP (w->vertical_scroll_bar)) @@ -3896,11 +3887,11 @@ hwnd = SCROLL_BAR_W32_WINDOW (bar); /* If already correctly positioned, do nothing. */ - if ( XINT (bar->left) == sb_left - && XINT (bar->top) == top - && XINT (bar->width) == sb_width - && XINT (bar->height) == height - && !NILP (bar->fringe_extended_p) == fringe_extended_p ) + if (XINT (bar->left) == sb_left + && XINT (bar->top) == top + && XINT (bar->width) == sb_width + && XINT (bar->height) == height + && bar->fringe_extended_p == fringe_extended_p) { /* Redraw after clear_frame. */ if (!my_show_window (f, hwnd, SW_NORMAL)) @@ -3950,7 +3941,7 @@ unblock_input (); } } - bar->fringe_extended_p = fringe_extended_p ? Qt : Qnil; + bar->fringe_extended_p = fringe_extended_p; w32_set_scroll_bar_thumb (bar, portion, position, whole); XSETVECTOR (barobj, bar); === modified file 'src/w32term.h' --- src/w32term.h 2013-08-03 03:29:03 +0000 +++ src/w32term.h 2013-08-13 15:29:25 +0000 @@ -451,9 +451,9 @@ being dragged, this is Qnil. */ Lisp_Object dragging; - /* t if the background of the fringe that is adjacent to a scroll + /* 1 if the background of the fringe that is adjacent to a scroll bar is extended to the gap between the fringe and the bar. */ - Lisp_Object fringe_extended_p; + unsigned fringe_extended_p : 1; }; /* Turning a lisp vector value into a pointer to a struct scroll_bar. */ === modified file 'src/window.h' --- src/window.h 2013-08-13 14:45:58 +0000 +++ src/window.h 2013-08-13 15:29:25 +0000 @@ -828,13 +828,25 @@ #define WINDOW_TEXT_TO_FRAME_PIXEL_X(W, X) \ (window_box_left ((W), TEXT_AREA) + (X)) -/* This is the window in which the terminal's cursor should - be left when nothing is being done with it. This must - always be a leaf window, and its buffer is selected by - the top level editing loop at the end of each command. - - This value is always the same as - FRAME_SELECTED_WINDOW (selected_frame). */ +/* Nonzero if the background of the window W's fringe that is adjacent to + a scroll bar is extended to the gap between the fringe and the bar. */ + +#define WINDOW_FRINGE_EXTENDED_P(w) \ + (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) \ + ? (WINDOW_LEFTMOST_P (w) \ + && WINDOW_LEFT_FRINGE_WIDTH (w) \ + && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) \ + || WINDOW_LEFT_MARGIN_COLS (w) == 0)) \ + : (WINDOW_RIGHTMOST_P (w) \ + && WINDOW_RIGHT_FRINGE_WIDTH (w) \ + && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) \ + || WINDOW_RIGHT_MARGIN_COLS (w) == 0))) + +/* This is the window in which the terminal's cursor should be left when + nothing is being done with it. This must always be a leaf window, and its + buffer is selected by the top level editing loop at the end of each command. + + This value is always the same as FRAME_SELECTED_WINDOW (selected_frame). */ extern Lisp_Object selected_window; === modified file 'src/xterm.c' --- src/xterm.c 2013-08-11 01:30:20 +0000 +++ src/xterm.c 2013-08-13 15:29:25 +0000 @@ -5155,7 +5155,7 @@ int top, height, left, sb_left, width, sb_width; int window_y, window_height; #ifdef USE_TOOLKIT_SCROLL_BARS - int fringe_extended_p; + bool fringe_extended_p; #endif /* Get window dimensions. */ @@ -5188,16 +5188,7 @@ #endif #ifdef USE_TOOLKIT_SCROLL_BARS - if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)) - fringe_extended_p = (WINDOW_LEFTMOST_P (w) - && WINDOW_LEFT_FRINGE_WIDTH (w) - && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) - || WINDOW_LEFT_MARGIN_COLS (w) == 0)); - else - fringe_extended_p = (WINDOW_RIGHTMOST_P (w) - && WINDOW_RIGHT_FRINGE_WIDTH (w) - && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) - || WINDOW_RIGHT_MARGIN_COLS (w) == 0)); + fringe_extended_p = WINDOW_FRINGE_EXTENDED_P (w); #endif /* Does the scroll bar exist yet? */ === modified file 'src/xterm.h' --- src/xterm.h 2013-08-02 03:55:24 +0000 +++ src/xterm.h 2013-08-13 15:29:25 +0000 @@ -815,7 +815,7 @@ /* 1 if the background of the fringe that is adjacent to a scroll bar is extended to the gap between the fringe and the bar. */ - unsigned int fringe_extended_p : 1; + unsigned fringe_extended_p : 1; }; /* Turning a lisp vector value into a pointer to a struct scroll_bar. */ ------------------------------------------------------------ revno: 113845 committer: Paul Eggert branch nick: trunk timestamp: Tue 2013-08-13 08:00:58 -0700 message: * decompress.c (Fzlib_decompress_region): Try to clarify 'avail_out'. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-13 14:45:58 +0000 +++ src/ChangeLog 2013-08-13 15:00:58 +0000 @@ -1,3 +1,7 @@ +2013-08-13 Paul Eggert + + * decompress.c (Fzlib_decompress_region): Try to clarify 'avail_out'. + 2013-08-13 Dmitry Antipov * window.h (struct window): Convert left_margin_cols and === modified file 'src/decompress.c' --- src/decompress.c 2013-08-12 19:48:04 +0000 +++ src/decompress.c 2013-08-13 15:00:58 +0000 @@ -26,6 +26,8 @@ #include "character.h" #include "buffer.h" +#include + static Lisp_Object Qzlib_dll; #ifdef WINDOWSNT @@ -178,10 +180,11 @@ do { /* Maximum number of bytes that one 'inflate' call should read and write. - zlib requires that these values not exceed UINT_MAX. - Do not make avail_out too large, as that might unduly delay C-g. */ + Do not make avail_out too large, as that might unduly delay C-g. + In any case zlib requires that these values not exceed UINT_MAX. */ ptrdiff_t avail_in = min (iend - pos_byte, UINT_MAX); - ptrdiff_t avail_out = min (1 << 14, UINT_MAX); + enum { avail_out = 1 << 14 }; + verify (avail_out <= UINT_MAX); ptrdiff_t decompressed; ------------------------------------------------------------ revno: 113844 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-08-13 18:45:58 +0400 message: * window.h (struct window): Convert left_margin_cols and right_margin_cols from Lisp_Objects to integers. Adjust comment. (WINDOW_LEFT_MARGIN_COLS, WINDOW_RIGHT_MARGIN_COLS) (WINDOW_LEFT_MARGIN_WIDTH, WINDOW_RIGHT_MARGIN_WIDTH): Adjust users. * dispnew.c (margin_glyphs_to_reserve): Convert 3rd arg to int. Adjust comment. (showing_window_margins_p, update_window_line, update_frame_1): * fringe.c (draw_fringe_bitmap_1): * xdisp.c (window_box_width): Adjust users. * window.c (wset_left_margin_cols, wset_right_margin_cols): Remove. (adjust_window_margins, set_window_buffer, Fsplit_window_internal): Use direct assignment. (Fset_window_configuration, save_window_save, Fwindow_margins): Convert Lisp_Object to integer and back where appropriate. (Fset_window_margins): Adjust user. Return t if any margin was actually changed, and mention this in docstring. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-13 14:26:39 +0000 +++ src/ChangeLog 2013-08-13 14:45:58 +0000 @@ -1,3 +1,23 @@ +2013-08-13 Dmitry Antipov + + * window.h (struct window): Convert left_margin_cols and + right_margin_cols from Lisp_Objects to integers. Adjust comment. + (WINDOW_LEFT_MARGIN_COLS, WINDOW_RIGHT_MARGIN_COLS) + (WINDOW_LEFT_MARGIN_WIDTH, WINDOW_RIGHT_MARGIN_WIDTH): + Adjust users. + * dispnew.c (margin_glyphs_to_reserve): Convert 3rd arg to int. + Adjust comment. + (showing_window_margins_p, update_window_line, update_frame_1): + * fringe.c (draw_fringe_bitmap_1): + * xdisp.c (window_box_width): Adjust users. + * window.c (wset_left_margin_cols, wset_right_margin_cols): Remove. + (adjust_window_margins, set_window_buffer, Fsplit_window_internal): + Use direct assignment. + (Fset_window_configuration, save_window_save, Fwindow_margins): + Convert Lisp_Object to integer and back where appropriate. + (Fset_window_margins): Adjust user. Return t if any margin + was actually changed, and mention this in docstring. + 2013-08-13 Xue Fuqiao * syntax.c (forward_word): === modified file 'src/dispnew.c' --- src/dispnew.c 2013-08-08 14:51:07 +0000 +++ src/dispnew.c 2013-08-13 14:45:58 +0000 @@ -359,25 +359,19 @@ /* Return the number of glyphs to reserve for a marginal area of window W. TOTAL_GLYPHS is the number of glyphs in a complete display line of window W. MARGIN gives the width of the marginal - area in canonical character units. MARGIN should be an integer - or a float. */ + area in canonical character units. */ static int -margin_glyphs_to_reserve (struct window *w, int total_glyphs, Lisp_Object margin) +margin_glyphs_to_reserve (struct window *w, int total_glyphs, int margin) { - int n; - - if (NUMBERP (margin)) + if (margin > 0) { int width = w->total_cols; - double d = max (0, XFLOATINT (margin)); + double d = max (0, margin); d = min (width / 2 - 1, d); - n = (int) ((double) total_glyphs / width * d); + return (int) ((double) total_glyphs / width * d); } - else - n = 0; - - return n; + return 0; } /* Return true if ROW's hash value is correct. @@ -1867,7 +1861,7 @@ if (showing_window_margins_p (XWINDOW (w->contents))) return 1; } - else if (!NILP (w->left_margin_cols) || !NILP (w->right_margin_cols)) + else if (w->left_margin_cols > 0 || w->right_margin_cols > 0) return 1; w = NILP (w->next) ? 0 : XWINDOW (w->next); @@ -3807,8 +3801,7 @@ eassert (desired_row->enabled_p); /* Update display of the left margin area, if there is one. */ - if (!desired_row->full_width_p - && !NILP (w->left_margin_cols)) + if (!desired_row->full_width_p && w->left_margin_cols > 0) { changed_p = 1; update_marginal_area (w, LEFT_MARGIN_AREA, vpos); @@ -3828,8 +3821,7 @@ } /* Update display of the right margin area, if there is one. */ - if (!desired_row->full_width_p - && !NILP (w->right_margin_cols)) + if (!desired_row->full_width_p && w->right_margin_cols > 0) { changed_p = 1; update_marginal_area (w, RIGHT_MARGIN_AREA, vpos); @@ -4606,10 +4598,7 @@ int x = WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos); int y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos); - if (INTEGERP (w->left_margin_cols)) - x += XFASTINT (w->left_margin_cols); - - /* x = max (min (x, FRAME_TOTAL_COLS (f) - 1), 0); */ + x += max (0, w->left_margin_cols); cursor_to (f, y, x); } } === modified file 'src/fringe.c' --- src/fringe.c 2013-07-30 05:56:18 +0000 +++ src/fringe.c 2013-08-13 14:45:58 +0000 @@ -666,7 +666,7 @@ and OTOH leaving out that one pixel leaves behind traces of the cursor, if it was in column zero before drawing non-empty margin area. */ - && NILP (w->left_margin_cols)) + && w->left_margin_cols == 0) ? 1 : 0); p.bx = x - wd; p.nx = wd; === modified file 'src/window.c' --- src/window.c 2013-08-13 12:13:04 +0000 +++ src/window.c 2013-08-13 14:45:58 +0000 @@ -151,11 +151,6 @@ w->display_table = val; } static void -wset_left_margin_cols (struct window *w, Lisp_Object val) -{ - w->left_margin_cols = val; -} -static void wset_new_normal (struct window *w, Lisp_Object val) { w->new_normal = val; @@ -186,11 +181,6 @@ w->pointm = val; } static void -wset_right_margin_cols (struct window *w, Lisp_Object val) -{ - w->right_margin_cols = val; -} -static void wset_scroll_bar_width (struct window *w, Lisp_Object val) { w->scroll_bar_width = val; @@ -3058,15 +3048,12 @@ if (WINDOW_RIGHT_MARGIN_COLS (w) > 0) { if (WINDOW_LEFT_MARGIN_COLS (w) > 0) - { - wset_left_margin_cols (w, make_number (margin_cols / 2)); - wset_right_margin_cols (w, make_number (margin_cols / 2)); - } + w->left_margin_cols = w->right_margin_cols = margin_cols / 2; else - wset_right_margin_cols (w, make_number (margin_cols)); + w->right_margin_cols = margin_cols; } else - wset_left_margin_cols (w, make_number (margin_cols)); + w->left_margin_cols = margin_cols; return 1; } @@ -3223,11 +3210,11 @@ /* This may call adjust_window_margins three times, so temporarily disable window margins. */ - Lisp_Object save_left = w->left_margin_cols; - Lisp_Object save_right = w->right_margin_cols; + int save_left = w->left_margin_cols; + int save_right = w->right_margin_cols; - wset_left_margin_cols (w, Qnil); - wset_right_margin_cols (w, Qnil); + w->left_margin_cols = 0; + w->right_margin_cols = 0; Fset_window_fringes (window, BVAR (b, left_fringe_width), BVAR (b, right_fringe_width), @@ -3237,8 +3224,8 @@ BVAR (b, scroll_bar_width), BVAR (b, vertical_scroll_bar_type), Qnil); - wset_left_margin_cols (w, save_left); - wset_right_margin_cols (w, save_right); + w->left_margin_cols = save_left; + w->right_margin_cols = save_right; Fset_window_margins (window, BVAR (b, left_margin_cols), BVAR (b, right_margin_cols)); @@ -3939,8 +3926,8 @@ memset (&n->last_cursor, 0, sizeof n->last_cursor); /* Get special geometry settings from reference window. */ - wset_left_margin_cols (n, r->left_margin_cols); - wset_right_margin_cols (n, r->right_margin_cols); + n->left_margin_cols = r->left_margin_cols; + n->right_margin_cols = r->right_margin_cols; n->left_fringe_width = r->left_fringe_width; n->right_fringe_width = r->right_fringe_width; n->fringes_outside_margins = r->fringes_outside_margins; @@ -5682,8 +5669,8 @@ w->hscroll = XFASTINT (p->hscroll); w->min_hscroll = XFASTINT (p->min_hscroll); wset_display_table (w, p->display_table); - wset_left_margin_cols (w, p->left_margin_cols); - wset_right_margin_cols (w, p->right_margin_cols); + w->left_margin_cols = XINT (p->left_margin_cols); + w->right_margin_cols = XINT (p->right_margin_cols); w->left_fringe_width = XINT (p->left_fringe_width); w->right_fringe_width = XINT (p->right_fringe_width); w->fringes_outside_margins = !NILP (p->fringes_outside_margins); @@ -5983,8 +5970,8 @@ XSETFASTINT (p->hscroll, w->hscroll); XSETFASTINT (p->min_hscroll, w->min_hscroll); p->display_table = w->display_table; - p->left_margin_cols = w->left_margin_cols; - p->right_margin_cols = w->right_margin_cols; + p->left_margin_cols = make_number (w->left_margin_cols); + p->right_margin_cols = make_number (w->right_margin_cols); p->left_fringe_width = make_number (w->left_fringe_width); p->right_fringe_width = make_number (w->right_fringe_width); p->fringes_outside_margins = w->fringes_outside_margins ? Qt : Qnil; @@ -6142,38 +6129,31 @@ Second arg LEFT-WIDTH specifies the number of character cells to reserve for the left marginal area. Optional third arg RIGHT-WIDTH does the same for the right marginal area. A nil width parameter -means no margin. */) +means no margin. + +Return t if any margin was actually changed and nil otherwise. */) (Lisp_Object window, Lisp_Object left_width, Lisp_Object right_width) { struct window *w = decode_live_window (window); - - /* Translate negative or zero widths to nil. - Margins that are too wide have to be checked elsewhere. */ - - if (!NILP (left_width)) - { - CHECK_NUMBER (left_width); - if (XINT (left_width) <= 0) - left_width = Qnil; - } - - if (!NILP (right_width)) - { - CHECK_NUMBER (right_width); - if (XINT (right_width) <= 0) - right_width = Qnil; - } - - if (!EQ (w->left_margin_cols, left_width) - || !EQ (w->right_margin_cols, right_width)) - { - wset_left_margin_cols (w, left_width); - wset_right_margin_cols (w, right_width); + int left, right; + + /* FIXME: what about margins that are too wide? */ + + left = (NILP (left_width) ? 0 + : (CHECK_NATNUM (left_width), XINT (left_width))); + right = (NILP (right_width) ? 0 + : (CHECK_NATNUM (right_width), XINT (right_width))); + + if (w->left_margin_cols != left || w->right_margin_cols != right) + { + w->left_margin_cols = left; + w->right_margin_cols = right; adjust_window_margins (w); ++windows_or_buffers_changed; adjust_glyphs (XFRAME (WINDOW_FRAME (w))); + return Qt; } return Qnil; @@ -6191,7 +6171,8 @@ (Lisp_Object window) { struct window *w = decode_live_window (window); - return Fcons (w->left_margin_cols, w->right_margin_cols); + return Fcons (make_number (w->left_margin_cols), + make_number (w->right_margin_cols)); } === modified file 'src/window.h' --- src/window.h 2013-08-13 12:13:04 +0000 +++ src/window.h 2013-08-13 14:45:58 +0000 @@ -141,11 +141,6 @@ it yet, or if the frame doesn't have any scroll bars, this is nil. */ Lisp_Object vertical_scroll_bar; - /* Width of left and right marginal areas. A value of nil means - no margin. */ - Lisp_Object left_margin_cols; - Lisp_Object right_margin_cols; - /* Pixel width of scroll bars. A value of nil or t means use frame values. */ Lisp_Object scroll_bar_width; @@ -269,6 +264,11 @@ int left_fringe_width; int right_fringe_width; + /* Width of left and right marginal areas in columns. + A value of 0 means no margin. */ + int left_margin_cols; + int right_margin_cols; + /* Non-zero if this window is a minibuffer window. */ unsigned mini : 1; @@ -600,33 +600,21 @@ /* Width of left margin area in columns. */ -#define WINDOW_LEFT_MARGIN_COLS(W) \ - (NILP (W->left_margin_cols) \ - ? 0 \ - : XINT (W->left_margin_cols)) +#define WINDOW_LEFT_MARGIN_COLS(W) (W->left_margin_cols) /* Width of right marginal area in columns. */ -#define WINDOW_RIGHT_MARGIN_COLS(W) \ - (NILP (W->right_margin_cols) \ - ? 0 \ - : XINT (W->right_margin_cols)) +#define WINDOW_RIGHT_MARGIN_COLS(W) (W->right_margin_cols) /* Width of left margin area in pixels. */ -#define WINDOW_LEFT_MARGIN_WIDTH(W) \ - (NILP (W->left_margin_cols) \ - ? 0 \ - : (XINT (W->left_margin_cols) \ - * WINDOW_FRAME_COLUMN_WIDTH (W))) +#define WINDOW_LEFT_MARGIN_WIDTH(W) \ + (W->left_margin_cols * WINDOW_FRAME_COLUMN_WIDTH (W)) /* Width of right marginal area in pixels. */ -#define WINDOW_RIGHT_MARGIN_WIDTH(W) \ - (NILP (W->right_margin_cols) \ - ? 0 \ - : (XINT (W->right_margin_cols) \ - * WINDOW_FRAME_COLUMN_WIDTH (W))) +#define WINDOW_RIGHT_MARGIN_WIDTH(W) \ + (W->right_margin_cols * WINDOW_FRAME_COLUMN_WIDTH (W)) /* Total width of fringes reserved for drawing truncation bitmaps, continuation bitmaps and alike. The width is in canonical char === modified file 'src/xdisp.c' --- src/xdisp.c 2013-08-13 08:58:15 +0000 +++ src/xdisp.c 2013-08-13 14:45:58 +0000 @@ -982,22 +982,18 @@ if (area == TEXT_AREA) { - if (INTEGERP (w->left_margin_cols)) - cols -= XFASTINT (w->left_margin_cols); - if (INTEGERP (w->right_margin_cols)) - cols -= XFASTINT (w->right_margin_cols); + cols -= max (0, w->left_margin_cols); + cols -= max (0, w->right_margin_cols); pixels = -WINDOW_TOTAL_FRINGE_WIDTH (w); } else if (area == LEFT_MARGIN_AREA) { - cols = (INTEGERP (w->left_margin_cols) - ? XFASTINT (w->left_margin_cols) : 0); + cols = max (0, w->left_margin_cols); pixels = 0; } else if (area == RIGHT_MARGIN_AREA) { - cols = (INTEGERP (w->right_margin_cols) - ? XFASTINT (w->right_margin_cols) : 0); + cols = max (0, w->right_margin_cols); pixels = 0; } } ------------------------------------------------------------ revno: 113843 committer: Xue Fuqiao branch nick: trunk timestamp: Tue 2013-08-13 22:26:39 +0800 message: Doc fix for forward-word and backward-word. * doc/lispref/positions.texi (Word Motion): Remove redundant sentence. * lisp/simple.el (backward-word): Mention the optional argument. * src/syntax.c (forward_word): Mention the optional argument. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-08-13 07:15:27 +0000 +++ doc/lispref/ChangeLog 2013-08-13 14:26:39 +0000 @@ -1,3 +1,7 @@ +2013-08-13 Xue Fuqiao + + * positions.texi (Word Motion): Remove redundant sentence. + 2013-08-13 Glenn Morris * lists.texi (List Elements): === modified file 'doc/lispref/positions.texi' --- doc/lispref/positions.texi 2013-08-06 06:53:09 +0000 +++ doc/lispref/positions.texi 2013-08-13 14:26:39 +0000 @@ -191,8 +191,8 @@ @deffn Command forward-word &optional count This function moves point forward @var{count} words (or backward if -@var{count} is negative). If @var{count} is @code{nil}, it moves -forward one word. +@var{count} is negative). If @var{count} is omitted or @code{nil}, it +defaults to 1. ``Moving one word'' means moving until point crosses a word-constituent character and then encounters a word-separator @@ -210,7 +210,7 @@ this function ignores field boundaries. In an interactive call, @var{count} is specified by the numeric prefix -argument. If @var{count} is omitted or @code{nil}, it defaults to 1. +argument. @end deffn @deffn Command backward-word &optional count === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-13 13:47:54 +0000 +++ lisp/ChangeLog 2013-08-13 14:26:39 +0000 @@ -1,3 +1,7 @@ +2013-08-13 Xue Fuqiao + + * simple.el (backward-word): Mention the optional argument. + 2013-08-13 Stefan Monnier * frameset.el (frameset--make): Rename constructor from make-frameset. === modified file 'lisp/simple.el' --- lisp/simple.el 2013-08-09 21:22:44 +0000 +++ lisp/simple.el 2013-08-13 14:26:39 +0000 @@ -3338,6 +3338,7 @@ be copied into other buffers." (funcall filter-buffer-substring-function beg end delete)) +;; FIXME: `with-wrapper-hook' is obsolete (defun buffer-substring--filter (beg end &optional delete) (with-wrapper-hook filter-buffer-substring-functions (beg end delete) (cond @@ -5670,7 +5671,8 @@ (defun backward-word (&optional arg) "Move backward until encountering the beginning of a word. -With argument ARG, do this that many times." +With argument ARG, do this that many times. +If ARG is omitted or nil, move point backward one word." (interactive "^p") (forward-word (- (or arg 1)))) === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-13 14:09:12 +0000 +++ src/ChangeLog 2013-08-13 14:26:39 +0000 @@ -1,5 +1,6 @@ 2013-08-13 Xue Fuqiao + * syntax.c (forward_word): * cmds.c (forward_char, backward_char): Mention the optional argument. 2013-08-13 Dmitry Antipov === modified file 'src/syntax.c' --- src/syntax.c 2013-07-10 16:11:09 +0000 +++ src/syntax.c 2013-08-13 14:26:39 +0000 @@ -1464,6 +1464,7 @@ DEFUN ("forward-word", Fforward_word, Sforward_word, 0, 1, "^p", doc: /* Move point forward ARG words (backward if ARG is negative). +If ARG is omitted or nil, move point forward one word. Normally returns t. If an edge of the buffer or a field boundary is reached, point is left there and the function returns nil. Field boundaries are not noticed if ------------------------------------------------------------ revno: 113842 committer: Xue Fuqiao branch nick: trunk timestamp: Tue 2013-08-13 22:09:12 +0800 message: * src/cmds.c (forward_char, backward_char): Mention the optional argument. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-13 12:13:04 +0000 +++ src/ChangeLog 2013-08-13 14:09:12 +0000 @@ -1,3 +1,7 @@ +2013-08-13 Xue Fuqiao + + * cmds.c (forward_char, backward_char): Mention the optional argument. + 2013-08-13 Dmitry Antipov * window.h (struct window): Convert left_fringe_width === modified file 'src/cmds.c' --- src/cmds.c 2013-01-01 09:11:05 +0000 +++ src/cmds.c 2013-08-13 14:09:12 +0000 @@ -86,6 +86,7 @@ doc: /* Move point N characters forward (backward if N is negative). On reaching end or beginning of buffer, stop and signal error. Interactively, N is the numeric prefix argument. +If N is omitted or nil, move point 1 character forward. Depending on the bidirectional context, the movement may be to the right or to the left on the screen. This is in contrast with @@ -99,6 +100,7 @@ doc: /* Move point N characters backward (forward if N is negative). On attempt to pass beginning or end of buffer, stop and signal error. Interactively, N is the numeric prefix argument. +If N is omitted or nil, move point 1 character backward. Depending on the bidirectional context, the movement may be to the right or to the left on the screen. This is in contrast with ------------------------------------------------------------ revno: 113841 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-08-13 09:47:54 -0400 message: * lisp/frameset.el (frameset--make): Rename constructor from make-frameset. (frameset-p, frameset-valid-p): Don't autoload. (frameset-valid-p): Use normal accessors. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-13 07:56:43 +0000 +++ lisp/ChangeLog 2013-08-13 13:47:54 +0000 @@ -1,3 +1,9 @@ +2013-08-13 Stefan Monnier + + * frameset.el (frameset--make): Rename constructor from make-frameset. + (frameset-p, frameset-valid-p): Don't autoload. + (frameset-valid-p): Use normal accessors. + 2013-08-13 Glenn Morris * progmodes/compile.el (compile-command): Tweak example in doc. === modified file 'lisp/frameset.el' --- lisp/frameset.el 2013-08-11 03:09:21 +0000 +++ lisp/frameset.el 2013-08-13 13:47:54 +0000 @@ -42,6 +42,7 @@ (cl-defstruct (frameset (:type vector) :named + (:constructor frameset--make) ;; Copier is defined below. (:copier nil)) @@ -129,36 +130,33 @@ IMPORTANT: Modifying this slot may cause frameset functions to fail, unless the type constraints defined above are respected.\n\n(fn FRAMESET)") -;;;###autoload (autoload 'frameset-p "frameset" -;;;###autoload "Return non-nil if OBJECT is a frameset, nil otherwise." nil) +;; We autoloaded this for use in register.el, but now that we use registerv +;; objects, this autoload is not useful any more. +;; ;;;###autoload (autoload 'frameset-p "frameset" +;; ;;;###autoload "Return non-nil if OBJECT is a frameset, nil otherwise." nil) (defun frameset-copy (frameset) "Return a deep copy of FRAMESET. FRAMESET is copied with `copy-tree'." (copy-tree frameset t)) -;;;###autoload (defun frameset-valid-p (object) - "Return non-nil if OBJECT is a valid frameset, nil otherwise. - -The return value is nil if OBJECT is not a frameset, or not -a valid one, and the frameset version if it is valid." - (and (vectorp object) ; a vector - (>= (length object) 8) ; of the right length (future-proof) - (eq (aref object 0) 'frameset) ; tagged as `frameset' - (integerp (aref object 1)) ; VERSION is an int - (consp (aref object 2)) ; TIMESTAMP is a non-null list - (let ((app (aref object 3))) + "Return non-nil if OBJECT is a valid frameset, nil otherwise." + (and (frameset-p object) + (integerp (frameset-version object)) + (consp (frameset-timestamp object)) + (let ((app (frameset-app object))) (or (null app) ; APP is nil (symbolp app) ; or a symbol (and (consp app) ; or a list (symbolp (car app))))) ; starting with a symbol - (stringp (or (aref object 4) "")) ; NAME is a string or nil - (stringp (or (aref object 5) "")) ; DESCRIPTION is a string or nil - (listp (aref object 6)) ; PROPERTIES is a list - (listp (aref object 7)) ; and STATES is, too - (cl-every #'consp (aref object 7)) ; and an alist - (aref object 1))) ; return VERSION + (stringp (or (frameset-name object) "")) + (stringp (or (frameset-description object) "")) + (listp (frameset-properties object)) + (let ((states (frameset-states object))) + (and (listp states) + (cl-every #'consp (frameset-states object)))) + (frameset-version object))) ; And VERSION is non-nil. ;; A setf'able accessor to the frameset's properties (defun frameset-prop (frameset property) @@ -755,7 +753,7 @@ list))) fs) (frameset--record-minibuffer-relationships frames) - (setq fs (make-frameset + (setq fs (frameset--make :app app :name name :description description ------------------------------------------------------------ revno: 113840 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-08-13 16:13:04 +0400 message: * window.h (struct window): Convert left_fringe_width and right_fringe_width from Lisp_Objects to integers. Adjust comment. (WINDOW_FRINGE_COLS, WINDOW_LEFT_FRINGE_WIDTH) (WINDOW_RIGHT_FRINGE_WIDTH): Adjust users. * window.c (wset_left_fringe_width, wset_right_fringe_width): Remove. (make_window): Initialize new integer fields to -1. (Fsplit_window_internal): Use direct assignment. (Fset_window_configuration, save_window_save): Convert Lisp_Object to integer and back where appropriate. (Fset_window_fringes): Adjust user. Return t if any fringe was actually changed, and mention this in docstring. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-13 08:58:15 +0000 +++ src/ChangeLog 2013-08-13 12:13:04 +0000 @@ -1,5 +1,21 @@ 2013-08-13 Dmitry Antipov + * window.h (struct window): Convert left_fringe_width + and right_fringe_width from Lisp_Objects to integers. + Adjust comment. + (WINDOW_FRINGE_COLS, WINDOW_LEFT_FRINGE_WIDTH) + (WINDOW_RIGHT_FRINGE_WIDTH): Adjust users. + * window.c (wset_left_fringe_width, wset_right_fringe_width): + Remove. + (make_window): Initialize new integer fields to -1. + (Fsplit_window_internal): Use direct assignment. + (Fset_window_configuration, save_window_save): Convert + Lisp_Object to integer and back where appropriate. + (Fset_window_fringes): Adjust user. Return t if any fringe + was actually changed, and mention this in docstring. + +2013-08-13 Dmitry Antipov + * keyboard.c (Fdiscard_input): Do not increment update_mode_lines. * nsfns.m (x_set_cursor_type): * w32fns.c (x_set_cursor_type): === modified file 'src/window.c' --- src/window.c 2013-08-13 08:17:50 +0000 +++ src/window.c 2013-08-13 12:13:04 +0000 @@ -151,11 +151,6 @@ w->display_table = val; } static void -wset_left_fringe_width (struct window *w, Lisp_Object val) -{ - w->left_fringe_width = val; -} -static void wset_left_margin_cols (struct window *w, Lisp_Object val) { w->left_margin_cols = val; @@ -191,11 +186,6 @@ w->pointm = val; } static void -wset_right_fringe_width (struct window *w, Lisp_Object val) -{ - w->right_fringe_width = val; -} -static void wset_right_margin_cols (struct window *w, Lisp_Object val) { w->right_margin_cols = val; @@ -3481,6 +3471,7 @@ /* Initialize non-Lisp data. Note that allocate_window zeroes out all non-Lisp data, so do it only for slots which should not be zero. */ w->nrows_scale_factor = w->ncols_scale_factor = 1; + w->left_fringe_width = w->right_fringe_width = -1; w->phys_cursor_type = -1; w->phys_cursor_width = -1; w->column_number_displayed = -1; @@ -3950,8 +3941,8 @@ /* Get special geometry settings from reference window. */ wset_left_margin_cols (n, r->left_margin_cols); wset_right_margin_cols (n, r->right_margin_cols); - wset_left_fringe_width (n, r->left_fringe_width); - wset_right_fringe_width (n, r->right_fringe_width); + n->left_fringe_width = r->left_fringe_width; + n->right_fringe_width = r->right_fringe_width; n->fringes_outside_margins = r->fringes_outside_margins; wset_scroll_bar_width (n, r->scroll_bar_width); wset_vertical_scroll_bar_type (n, r->vertical_scroll_bar_type); @@ -5693,8 +5684,8 @@ wset_display_table (w, p->display_table); wset_left_margin_cols (w, p->left_margin_cols); wset_right_margin_cols (w, p->right_margin_cols); - wset_left_fringe_width (w, p->left_fringe_width); - wset_right_fringe_width (w, p->right_fringe_width); + w->left_fringe_width = XINT (p->left_fringe_width); + w->right_fringe_width = XINT (p->right_fringe_width); w->fringes_outside_margins = !NILP (p->fringes_outside_margins); wset_scroll_bar_width (w, p->scroll_bar_width); wset_vertical_scroll_bar_type (w, p->vertical_scroll_bar_type); @@ -5994,8 +5985,8 @@ p->display_table = w->display_table; p->left_margin_cols = w->left_margin_cols; 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->left_fringe_width = make_number (w->left_fringe_width); + p->right_fringe_width = make_number (w->right_fringe_width); 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; @@ -6221,25 +6212,28 @@ the command `set-fringe-style'. If optional fourth arg OUTSIDE-MARGINS is non-nil, draw the fringes outside of the display margins. By default, fringes are drawn between -display marginal areas and the text area. */) - (Lisp_Object window, Lisp_Object left_width, Lisp_Object right_width, Lisp_Object outside_margins) +display marginal areas and the text area. + +Return t if any fringe was actually changed and nil otherwise. */) + (Lisp_Object window, Lisp_Object left_width, + Lisp_Object right_width, Lisp_Object outside_margins) { struct window *w = decode_live_window (window); - int outside = !NILP (outside_margins); - - if (!NILP (left_width)) - CHECK_NATNUM (left_width); - if (!NILP (right_width)) - CHECK_NATNUM (right_width); - - /* Do nothing on a tty. */ + int left, right, outside = !NILP (outside_margins); + + left = (NILP (left_width) ? -1 + : (CHECK_NATNUM (left_width), XINT (left_width))); + right = (NILP (right_width) ? -1 + : (CHECK_NATNUM (right_width), XINT (right_width))); + + /* Do nothing on a tty or if nothing to actually change. */ if (FRAME_WINDOW_P (WINDOW_XFRAME (w)) - && (!EQ (w->left_fringe_width, left_width) - || !EQ (w->right_fringe_width, right_width) + && (w->left_fringe_width != left + || w->right_fringe_width != right || w->fringes_outside_margins != outside)) { - wset_left_fringe_width (w, left_width); - wset_right_fringe_width (w, right_width); + w->left_fringe_width = left; + w->right_fringe_width = right; w->fringes_outside_margins = outside; adjust_window_margins (w); @@ -6249,6 +6243,7 @@ ++windows_or_buffers_changed; adjust_glyphs (XFRAME (WINDOW_FRAME (w))); + return Qt; } return Qnil; === modified file 'src/window.h' --- src/window.h 2013-08-12 09:34:00 +0000 +++ src/window.h 2013-08-13 12:13:04 +0000 @@ -146,11 +146,6 @@ Lisp_Object left_margin_cols; Lisp_Object right_margin_cols; - /* Width of left and right fringes. - A value of nil or t means use frame values. */ - Lisp_Object left_fringe_width; - Lisp_Object right_fringe_width; - /* Pixel width of scroll bars. A value of nil or t means use frame values. */ Lisp_Object scroll_bar_width; @@ -269,6 +264,11 @@ /* This is handy for undrawing the cursor. */ int phys_cursor_ascent, phys_cursor_height; + /* Width of left and right fringes, in pixels. + A value of -1 means use frame values. */ + int left_fringe_width; + int right_fringe_width; + /* Non-zero if this window is a minibuffer window. */ unsigned mini : 1; @@ -635,10 +635,10 @@ able to split windows horizontally nicely. */ #define WINDOW_FRINGE_COLS(W) \ - ((INTEGERP (W->left_fringe_width) \ - || INTEGERP (W->right_fringe_width)) \ - ? ((WINDOW_LEFT_FRINGE_WIDTH (W) \ - + WINDOW_RIGHT_FRINGE_WIDTH (W) \ + ((W->left_fringe_width >= 0 \ + && W->right_fringe_width >= 0) \ + ? ((W->left_fringe_width \ + + W->right_fringe_width \ + WINDOW_FRAME_COLUMN_WIDTH (W) - 1) \ / WINDOW_FRAME_COLUMN_WIDTH (W)) \ : FRAME_FRINGE_COLS (WINDOW_XFRAME (W))) @@ -658,13 +658,11 @@ /* Pixel-width of the left and right fringe. */ #define WINDOW_LEFT_FRINGE_WIDTH(W) \ - (INTEGERP (W->left_fringe_width) \ - ? XFASTINT (W->left_fringe_width) \ + (W->left_fringe_width >= 0 ? W->left_fringe_width \ : FRAME_LEFT_FRINGE_WIDTH (WINDOW_XFRAME (W))) #define WINDOW_RIGHT_FRINGE_WIDTH(W) \ - (INTEGERP (W->right_fringe_width) \ - ? XFASTINT (W->right_fringe_width) \ + (W->right_fringe_width >= 0 ? W->right_fringe_width \ : FRAME_RIGHT_FRINGE_WIDTH (WINDOW_XFRAME (W))) /* Total width of fringes in pixels. */ ------------------------------------------------------------ revno: 113839 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-08-13 06:17:42 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2013-08-12 10:17:43 +0000 +++ autogen/configure 2013-08-13 10:17:42 +0000 @@ -13640,13 +13640,8 @@ HAVE_ZLIB=no LIBZ= if test "${with_zlib}" != "no"; then - if test "${HAVE_PNG}" = "yes"; then - ### PNG depends on zlib, so if we have PNG, we have zlib. - HAVE_ZLIB=yes - else - ### No PNG, so check zlib ourselves. - OLIBS=$LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inflateEnd" >&5 + OLIBS=$LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inflateEnd" >&5 $as_echo_n "checking for library containing inflateEnd... " >&6; } if test "${ac_cv_search_inflateEnd+set}" = set; then : $as_echo_n "(cached) " >&6 @@ -13702,16 +13697,19 @@ HAVE_ZLIB=yes fi - LIBS=$OLIBS - case $ac_cv_search_inflateEnd in - -*) LIBZ=$ac_cv_search_inflateEnd ;; - esac - fi + LIBS=$OLIBS + case $ac_cv_search_inflateEnd in + -*) LIBZ=$ac_cv_search_inflateEnd ;; + esac fi if test "${HAVE_ZLIB}" = "yes"; then $as_echo "#define HAVE_ZLIB 1" >>confdefs.h + ### mingw32 doesn't use -lz, since it loads the library dynamically. + if test "${opsys}" = "mingw32"; then + LIBZ= + fi fi ------------------------------------------------------------ revno: 113838 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-08-13 12:58:15 +0400 message: * nsfns.m (x_set_cursor_type): * w32fns.c (x_set_cursor_type): * xfns.m (x_set_cursor_type): Do not set cursor_type_changed here... * xdisp.c (set_frame_cursor_types): ...but in common code. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-13 08:39:14 +0000 +++ src/ChangeLog 2013-08-13 08:58:15 +0000 @@ -1,6 +1,10 @@ 2013-08-13 Dmitry Antipov * keyboard.c (Fdiscard_input): Do not increment update_mode_lines. + * nsfns.m (x_set_cursor_type): + * w32fns.c (x_set_cursor_type): + * xfns.m (x_set_cursor_type): Do not set cursor_type_changed here... + * xdisp.c (set_frame_cursor_types): ...but in common code. 2013-08-13 Dmitry Antipov === modified file 'src/nsfns.m' --- src/nsfns.m 2013-08-11 15:05:13 +0000 +++ src/nsfns.m 2013-08-13 08:58:15 +0000 @@ -860,11 +860,7 @@ x_set_cursor_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { set_frame_cursor_types (f, arg); - - /* Make sure the cursor gets redrawn. */ - cursor_type_changed = 1; } - /* called to set mouse pointer color, but all other terms use it to initialize pointer types (and don't set the color ;) */ === modified file 'src/w32fns.c' --- src/w32fns.c 2013-08-09 12:25:34 +0000 +++ src/w32fns.c 2013-08-13 08:58:15 +0000 @@ -1528,11 +1528,8 @@ x_set_cursor_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { set_frame_cursor_types (f, arg); +} - /* Make sure the cursor gets redrawn. */ - cursor_type_changed = 1; -} - void x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { === modified file 'src/xdisp.c' --- src/xdisp.c 2013-08-12 09:34:00 +0000 +++ src/xdisp.c 2013-08-13 08:58:15 +0000 @@ -26003,6 +26003,9 @@ } else FRAME_BLINK_OFF_CURSOR (f) = DEFAULT_CURSOR; + + /* Make sure the cursor gets redrawn. */ + cursor_type_changed = 1; } === modified file 'src/xfns.c' --- src/xfns.c 2013-08-11 01:30:20 +0000 +++ src/xfns.c 2013-08-13 08:58:15 +0000 @@ -1053,11 +1053,8 @@ x_set_cursor_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { set_frame_cursor_types (f, arg); +} - /* Make sure the cursor gets redrawn. */ - cursor_type_changed = 1; -} - static void x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { ------------------------------------------------------------ revno: 113837 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-08-13 12:39:14 +0400 message: * keyboard.c (Fdiscard_input): Do not increment update_mode_lines. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-13 08:18:11 +0000 +++ src/ChangeLog 2013-08-13 08:39:14 +0000 @@ -1,5 +1,9 @@ 2013-08-13 Dmitry Antipov + * keyboard.c (Fdiscard_input): Do not increment update_mode_lines. + +2013-08-13 Dmitry Antipov + * font.c (clear_font_cache): New function, stripped from... (Fclear_font_cache): ...here, which now uses the function above. Adjust comment. === modified file 'src/keyboard.c' --- src/keyboard.c 2013-08-09 12:25:34 +0000 +++ src/keyboard.c 2013-08-13 08:39:14 +0000 @@ -10124,8 +10124,6 @@ end_kbd_macro (); } - update_mode_lines++; - Vunread_command_events = Qnil; discard_tty_input (); ------------------------------------------------------------ revno: 113836 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-08-13 12:18:11 +0400 message: * font.c (clear_font_cache): New function, stripped from... (Fclear_font_cache): ...here, which now uses the function above. Adjust comment. * font.h (clear_font_cache): Add prototype. * xfaces.c (clear_face_cache): Use clear_font_cache. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-13 08:17:50 +0000 +++ src/ChangeLog 2013-08-13 08:18:11 +0000 @@ -1,5 +1,13 @@ 2013-08-13 Dmitry Antipov + * font.c (clear_font_cache): New function, stripped from... + (Fclear_font_cache): ...here, which now uses the function + above. Adjust comment. + * font.h (clear_font_cache): Add prototype. + * xfaces.c (clear_face_cache): Use clear_font_cache. + +2013-08-13 Dmitry Antipov + * window.c (Fset_window_start): Compare `w', not `window' because `w' might not be equal to `window' after call to decode_live_window. === modified file 'src/font.c' --- src/font.c 2013-08-03 03:29:03 +0000 +++ src/font.c 2013-08-13 08:18:11 +0000 @@ -4226,36 +4226,38 @@ return make_string (name, namelen); } +void +clear_font_cache (struct frame *f) +{ + struct font_driver_list *driver_list = f->font_driver_list; + + for (; driver_list; driver_list = driver_list->next) + if (driver_list->on) + { + Lisp_Object val, tmp, cache = driver_list->driver->get_cache (f); + + val = XCDR (cache); + while (! NILP (val) + && ! EQ (XCAR (XCAR (val)), driver_list->driver->type)) + val = XCDR (val); + eassert (! NILP (val)); + tmp = XCDR (XCAR (val)); + if (XINT (XCAR (tmp)) == 0) + { + font_clear_cache (f, XCAR (val), driver_list->driver); + XSETCDR (cache, XCDR (val)); + } + } +} + DEFUN ("clear-font-cache", Fclear_font_cache, Sclear_font_cache, 0, 0, 0, - doc: /* Clear font cache. */) + doc: /* Clear font cache of each frame. */) (void) { Lisp_Object list, frame; FOR_EACH_FRAME (list, frame) - { - struct frame *f = XFRAME (frame); - struct font_driver_list *driver_list = f->font_driver_list; - - for (; driver_list; driver_list = driver_list->next) - if (driver_list->on) - { - Lisp_Object cache = driver_list->driver->get_cache (f); - Lisp_Object val, tmp; - - val = XCDR (cache); - while (! NILP (val) - && ! EQ (XCAR (XCAR (val)), driver_list->driver->type)) - val = XCDR (val); - eassert (! NILP (val)); - tmp = XCDR (XCAR (val)); - if (XINT (XCAR (tmp)) == 0) - { - font_clear_cache (f, XCAR (val), driver_list->driver); - XSETCDR (cache, XCDR (val)); - } - } - } + clear_font_cache (XFRAME (frame)); return Qnil; } === modified file 'src/font.h' --- src/font.h 2013-08-03 03:29:03 +0000 +++ src/font.h 2013-08-13 08:18:11 +0000 @@ -760,6 +760,7 @@ Lisp_Object spec); extern void font_prepare_for_face (struct frame *f, struct face *face); extern void font_done_for_face (struct frame *f, struct face *face); +extern void clear_font_cache (struct frame *); extern Lisp_Object font_open_by_spec (struct frame *f, Lisp_Object spec); extern Lisp_Object font_open_by_name (struct frame *f, Lisp_Object name); === modified file 'src/xfaces.c' --- src/xfaces.c 2013-08-03 03:29:03 +0000 +++ src/xfaces.c 2013-08-13 08:18:11 +0000 @@ -759,11 +759,6 @@ if (clear_fonts_p || ++clear_font_table_count == CLEAR_FONT_TABLE_COUNT) { -#if 0 - /* Not yet implemented. */ - clear_font_cache (frame); -#endif - /* From time to time see if we can unload some fonts. This also frees all realized faces on all frames. Fonts needed by faces will be loaded again when faces are realized again. */ @@ -774,7 +769,10 @@ struct frame *f = XFRAME (frame); if (FRAME_WINDOW_P (f) && FRAME_X_DISPLAY_INFO (f)->n_fonts > CLEAR_FONT_TABLE_NFONTS) - free_all_realized_faces (frame); + { + clear_font_cache (f); + free_all_realized_faces (frame); + } } } else ------------------------------------------------------------ revno: 113835 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-08-13 12:17:50 +0400 message: * window.c (Fset_window_start): Compare `w', not `window' because `w' might not be equal to `window' after call to decode_live_window. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-12 20:17:32 +0000 +++ src/ChangeLog 2013-08-13 08:17:50 +0000 @@ -1,3 +1,8 @@ +2013-08-13 Dmitry Antipov + + * window.c (Fset_window_start): Compare `w', not `window' because + `w' might not be equal to `window' after call to decode_live_window. + 2013-08-12 Paul Eggert * process.c (deactivate_process): Reset fds to -1 (Bug#15035). === modified file 'src/window.c' --- src/window.c 2013-08-12 09:34:00 +0000 +++ src/window.c 2013-08-13 08:17:50 +0000 @@ -1612,7 +1612,7 @@ if (NILP (noforce)) w->force_start = 1; w->update_mode_line = 1; - if (!EQ (window, selected_window)) + if (w != XWINDOW (selected_window)) /* Enforce full redisplay. FIXME: make it more selective. */ windows_or_buffers_changed++; ------------------------------------------------------------ revno: 113834 fixes bug: http://debbugs.gnu.org/15053 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-08-13 00:56:43 -0700 message: Tweak some settings of compile-command * progmodes/compile.el (compile-command): Tweak example in doc. * obsolete/scribe.el (scribe-mode): * progmodes/mixal-mode.el (mixal-mode): Quote buffer name. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-13 07:42:51 +0000 +++ lisp/ChangeLog 2013-08-13 07:56:43 +0000 @@ -1,5 +1,9 @@ 2013-08-13 Glenn Morris + * progmodes/compile.el (compile-command): Tweak example in doc. + * obsolete/scribe.el (scribe-mode): + * progmodes/mixal-mode.el (mixal-mode): Quote buffer name. (Bug#15053) + * mail/feedmail.el (feedmail-confirm-outgoing) (feedmail-display-full-frame, feedmail-deduce-bcc-where): Fix types. === modified file 'lisp/obsolete/scribe.el' --- lisp/obsolete/scribe.el 2013-01-01 09:11:05 +0000 +++ lisp/obsolete/scribe.el 2013-08-13 07:56:43 +0000 @@ -144,7 +144,9 @@ (set (make-local-variable 'sentence-end) "\\([.?!]\\|@:\\)[]\"')}]*\\($\\| $\\|\t\\| \\)[ \t\n]*") (set (make-local-variable 'compile-command) - (concat "scribe " (buffer-file-name)))) + (concat "scribe " + (if buffer-file-name + (shell-quote-argument (buffer-file-name)))))) (defun scribe-tab () (interactive) === modified file 'lisp/progmodes/compile.el' --- lisp/progmodes/compile.el 2013-08-05 14:26:57 +0000 +++ lisp/progmodes/compile.el 2013-08-13 07:56:43 +0000 @@ -624,7 +624,9 @@ (file-exists-p \"Makefile\")) (set (make-local-variable 'compile-command) (concat \"make -k \" - (file-name-sans-extension buffer-file-name))))))" + (if buffer-file-name + (shell-quote-argument + (file-name-sans-extension buffer-file-name))))))))" :type 'string :group 'compilation) ;;;###autoload(put 'compile-command 'safe-local-variable (lambda (a) (and (stringp a) (or (not (boundp 'compilation-read-command)) compilation-read-command)))) === modified file 'lisp/progmodes/mixal-mode.el' --- lisp/progmodes/mixal-mode.el 2013-01-01 09:11:05 +0000 +++ lisp/progmodes/mixal-mode.el 2013-08-13 07:56:43 +0000 @@ -1113,8 +1113,10 @@ mixal-syntax-propertize-function) ;; might add an indent function in the future ;; (set (make-local-variable 'indent-line-function) 'mixal-indent-line) - (set (make-local-variable 'compile-command) (concat "mixasm " - buffer-file-name))) + (set (make-local-variable 'compile-command) + (concat "mixasm " + (if buffer-file-name + (shell-quote-argument buffer-file-name))))) (provide 'mixal-mode) ------------------------------------------------------------ revno: 113833 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-08-13 00:42:51 -0700 message: Fix some custom types * lisp/cus-start.el (truncate-partial-width-windows): Fix type. * lisp/emulation/viper-init.el (viper-search-scroll-threshold): Fix type. * lisp/mail/feedmail.el (feedmail-confirm-outgoing) (feedmail-display-full-frame, feedmail-deduce-bcc-where): Fix types. * admin/admin.el: Related comments. diff: === modified file 'admin/cus-test.el' --- admin/cus-test.el 2013-05-16 00:20:34 +0000 +++ admin/cus-test.el 2013-08-13 07:42:51 +0000 @@ -202,6 +202,8 @@ ;; Check the values (mapc (lambda (value) + ;; TODO for booleans, check for values that can be + ;; evaluated and are not t or nil. Usually a bug. (unless (widget-apply conv :match value) (setq mismatch 'mismatch))) values) === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-13 07:18:50 +0000 +++ lisp/ChangeLog 2013-08-13 07:42:51 +0000 @@ -1,5 +1,12 @@ 2013-08-13 Glenn Morris + * mail/feedmail.el (feedmail-confirm-outgoing) + (feedmail-display-full-frame, feedmail-deduce-bcc-where): Fix types. + + * cus-start.el (truncate-partial-width-windows): Fix type. + + * emulation/viper-init.el (viper-search-scroll-threshold): Fix type. + * net/shr.el (shr-table-horizontal-line): Fix custom type. 2013-08-13 Stefan Monnier === modified file 'lisp/cus-start.el' --- lisp/cus-start.el 2013-05-15 23:55:41 +0000 +++ lisp/cus-start.el 2013-08-13 07:42:51 +0000 @@ -457,7 +457,12 @@ (scroll-margin windows integer) (hscroll-margin windows integer "22.1") (hscroll-step windows number "22.1") - (truncate-partial-width-windows display boolean "23.1") + (truncate-partial-width-windows + display + (choice (integer :tag "Truncate if narrower than") + (const :tag "Respect `truncate-lines'" nil) + (other :tag "Truncate if not full-width" t)) + "23.1") (make-cursor-line-fully-visible windows boolean) (mode-line-in-non-selected-windows mode-line boolean "22.1") (line-number-display-limit display === modified file 'lisp/emulation/viper-init.el' --- lisp/emulation/viper-init.el 2013-05-09 01:40:20 +0000 +++ lisp/emulation/viper-init.el 2013-08-13 07:42:51 +0000 @@ -690,7 +690,7 @@ the window will be scrolled up or down appropriately, to reveal context. If you want Viper search to behave as usual in Vi, set this variable to a negative number." - :type 'boolean + :type 'integer :group 'viper-search) (defcustom viper-re-query-replace t === modified file 'lisp/mail/feedmail.el' --- lisp/mail/feedmail.el 2013-05-21 07:25:14 +0000 +++ lisp/mail/feedmail.el 2013-08-13 07:42:51 +0000 @@ -407,8 +407,10 @@ cases. You can give a timeout for the prompt; see variable `feedmail-confirm-outgoing-timeout'." :group 'feedmail-misc - :type 'boolean - ) + :type '(choice (const nil) + (const queued) + (const immediate) + (other t))) (defcustom feedmail-display-full-frame 'queued @@ -425,8 +427,10 @@ shuttled robotically onward." :version "24.1" :group 'feedmail-misc - :type 'boolean - ) + :type '(choice (const nil) + (const queued) + (const immediate) + (other t))) (defcustom feedmail-confirm-outgoing-timeout nil @@ -483,8 +487,9 @@ is an option for either 'first or 'last because you might have a delivery agent that processes the addresses backwards." :group 'feedmail-headers - :type 'boolean - ) + :type '(choice (const nil) + (const first) + (const last))) (defcustom feedmail-fill-to-cc t ------------------------------------------------------------ revno: 113832 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-08-13 00:22:05 -0700 message: * gnus/gnus-icalendar.el (gnus-icalendar-org-capture-file): Fix type. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-08-13 07:18:50 +0000 +++ lisp/gnus/ChangeLog 2013-08-13 07:22:05 +0000 @@ -1,5 +1,7 @@ 2013-08-13 Glenn Morris + * gnus-icalendar.el (gnus-icalendar-org-capture-file): Fix type. + * gnus.el (gnus-valid-select-methods): Fix type. * nnimap.el (nnimap-request-articles-find-limit): Fix type, version. === modified file 'lisp/gnus/gnus-icalendar.el' --- lisp/gnus/gnus-icalendar.el 2013-08-06 22:09:27 +0000 +++ lisp/gnus/gnus-icalendar.el 2013-08-13 07:22:05 +0000 @@ -323,7 +323,7 @@ (defcustom gnus-icalendar-org-capture-file nil "Target Org file for storing captured calendar events." - :type 'file + :type '(choice (const nil) file) :group 'gnus-icalendar-org) (defcustom gnus-icalendar-org-capture-headline nil ------------------------------------------------------------ revno: 113831 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-08-13 00:18:50 -0700 message: Fix some custom types * gnus/gnus.el (gnus-valid-select-methods): Fix type. * gnus/nnimap.el (nnimap-request-articles-find-limit): Fix type, version. * net/shr.el (shr-table-horizontal-line): Fix custom type. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-13 02:30:52 +0000 +++ lisp/ChangeLog 2013-08-13 07:18:50 +0000 @@ -1,3 +1,7 @@ +2013-08-13 Glenn Morris + + * net/shr.el (shr-table-horizontal-line): Fix custom type. + 2013-08-13 Stefan Monnier * emacs-lisp/timer.el (timer--time-setter): New function. === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-08-12 06:32:15 +0000 +++ lisp/gnus/ChangeLog 2013-08-13 07:18:50 +0000 @@ -1,3 +1,9 @@ +2013-08-13 Glenn Morris + + * gnus.el (gnus-valid-select-methods): Fix type. + + * nnimap.el (nnimap-request-articles-find-limit): Fix type, version. + 2013-08-12 Katsumi Yamaoka * mm-decode.el (mm-display-external): Run a timer for the temp files === modified file 'lisp/gnus/gnus.el' --- lisp/gnus/gnus.el 2013-07-23 07:04:24 +0000 +++ lisp/gnus/gnus.el 2013-08-13 07:18:50 +0000 @@ -1649,6 +1649,7 @@ (const post-mail)) (checklist :inline t :greedy t (const :format "%v " address) + (const global) (const :format "%v " prompt-address) (const :format "%v " physical-address) (const virtual) === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2013-07-02 10:38:58 +0000 +++ lisp/gnus/nnimap.el 2013-08-13 07:18:50 +0000 @@ -130,8 +130,8 @@ (defcustom nnimap-request-articles-find-limit nil "Limit the number of articles to look for after moving an article." - :type 'integer - :version "24.3" + :type '(choice (const nil) integer) + :version "24.4" :group 'nnimap) (defvar nnimap-process nil) === modified file 'lisp/net/shr.el' --- lisp/net/shr.el 2013-08-06 22:05:33 +0000 +++ lisp/net/shr.el 2013-08-13 07:18:50 +0000 @@ -59,7 +59,7 @@ "Character used to draw horizontal table lines. If nil, don't draw horizontal table lines." :group 'shr - :type 'character) + :type '(choice (const nil) character)) (defcustom shr-table-vertical-line ?\s "Character used to draw vertical table lines." ------------------------------------------------------------ revno: 113830 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-08-13 00:15:27 -0700 message: * lispref/lists.texi (List Elements): Undocument nth, nthcdr with n < 0 diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-08-13 02:45:12 +0000 +++ doc/lispref/ChangeLog 2013-08-13 07:15:27 +0000 @@ -1,3 +1,8 @@ +2013-08-13 Glenn Morris + + * lists.texi (List Elements): + Undocument behavior of nth and nthcdr with n < 0. (Bug#15059) + 2013-08-13 Xue Fuqiao * frames.texi (Display Feature Testing): Add indexes. === modified file 'doc/lispref/lists.texi' --- doc/lispref/lists.texi 2013-01-01 09:11:05 +0000 +++ doc/lispref/lists.texi 2013-08-13 07:15:27 +0000 @@ -270,8 +270,10 @@ element number zero. If the length of @var{list} is @var{n} or less, the value is @code{nil}. -If @var{n} is negative, @code{nth} returns the first element of -@var{list}. +@c Behavior for -ve n undefined since 2013/08; see bug#15059. +@ignore +If @var{n} is negative, @code{nth} returns the first element of @var{list}. +@end ignore @example @group @@ -281,10 +283,6 @@ @group (nth 10 '(1 2 3 4)) @result{} nil -@end group -@group -(nth -3 '(1 2 3 4)) - @result{} 1 (nth n x) @equiv{} (car (nthcdr n x)) @end group @@ -300,7 +298,8 @@ words, it skips past the first @var{n} links of @var{list} and returns what follows. -If @var{n} is zero or negative, @code{nthcdr} returns all of +@c "or negative" removed 2013/08; see bug#15059. +If @var{n} is zero, @code{nthcdr} returns all of @var{list}. If the length of @var{list} is @var{n} or less, @code{nthcdr} returns @code{nil}. @@ -314,7 +313,7 @@ @result{} nil @end group @group -(nthcdr -3 '(1 2 3 4)) +(nthcdr 0 '(1 2 3 4)) @result{} (1 2 3 4) @end group @end example ------------------------------------------------------------ revno: 113829 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-08-13 00:04:10 -0700 message: * admin/FOR-RELEASE: Add note about bad Texinfo node names diff: === modified file 'admin/FOR-RELEASE' --- admin/FOR-RELEASE 2013-07-04 02:30:36 +0000 +++ admin/FOR-RELEASE 2013-08-13 07:04:10 +0000 @@ -3,6 +3,10 @@ * TO BE DONE SHORTLY BEFORE RELEASE ** Manuals +Check for node names using problematic characters: + find doc -name '*.texi' -exec grep '^@node[^,]*[:.()]' {} + +Sadly makeinfo does not warn about such characters. + Check cross-references between the manuals (eg from emacs to elisp) are correct. You can use something like the following in the info directory in the Emacs build tree: ------------------------------------------------------------ revno: 113828 [merge] committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-08-13 00:02:00 -0700 message: Merge from emacs-24; up to r111400 diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-08-12 01:48:11 +0000 +++ doc/misc/ChangeLog 2013-08-13 07:02:00 +0000 @@ -1,3 +1,18 @@ +2013-08-13 Glenn Morris + + * reftex.texi (LaTeX xr Package, Options - Table of Contents) + (Options - Defining Label Environments, Options - Creating Labels) + (Options - Referencing Labels, Options - Creating Citations) + (Options - Index Support, Options - Viewing Cross-References) + (Options - Finding Files, Options - Optimizations) + (Options - Fontification, Options - Misc): + * cc-mode.texi (Sample Init File): + * edt.texi (Init file): + * epa.texi (Encrypting/decrypting gpg files): + * mairix-el.texi (About, Setting up the mairix interface, Using) + (Extending): + Rename nodes to avoid characters that can cause Texinfo problems. + 2013-08-12 Katsumi Yamaoka * gnus.texi (Mail Source Specifiers): Fix description for pop3's :leave. === modified file 'doc/misc/cc-mode.texi' --- doc/misc/cc-mode.texi 2013-07-03 03:20:04 +0000 +++ doc/misc/cc-mode.texi 2013-08-13 07:02:00 +0000 @@ -241,7 +241,7 @@ * Customizing Indentation:: * Custom Macros:: * Odds and Ends:: -* Sample .emacs File:: +* Sample Init File:: * Performance Issues:: * Limitations and Known Bugs:: * FAQ:: @@ -1113,7 +1113,7 @@ This function is not bound to a key by default, but it's intended to be used on the @kbd{RET} key. If you like the behavior of @code{newline-and-indent} on @kbd{RET}, you should consider switching to -this function. @xref{Sample .emacs File}. +this function. @xref{Sample Init File}. @item @kbd{M-x c-context-open-line} @findex c-context-open-line @@ -1170,7 +1170,7 @@ You can toggle each of these minor modes on and off, and you can configure @ccmode{} so that it starts up with your favorite -combination of them (@pxref{Sample .emacs File}). By default, when +combination of them (@pxref{Sample Init File}). By default, when you initialize a buffer, electric mode and syntactic-indentation mode are enabled but the other two modes are disabled. @@ -2378,7 +2378,7 @@ @vindex initialization-hook (c-) Hook run only once per Emacs session, when @ccmode{} is initialized. This is a good place to change key bindings (or add new ones) in any -of the @ccmode{} key maps. @xref{Sample .emacs File}. +of the @ccmode{} key maps. @xref{Sample Init File}. @end defvar @defvar c-mode-common-hook @@ -2406,7 +2406,7 @@ Here's a simplified example of what you can add to your @file{.emacs} file to do things whenever any @ccmode{} language is edited. See the Emacs manuals for more information on customizing Emacs via hooks. -@xref{Sample .emacs File}, for a more complete sample @file{.emacs} +@xref{Sample Init File}, for a more complete sample @file{.emacs} file. @example @@ -2685,7 +2685,7 @@ style. To do this, put the new style's settings into a list with the following format; the list can then be passed as an argument to the function @code{c-add-style}. You can see an example of a style -definition in @ref{Sample .emacs File}. +definition in @ref{Sample Init File}. @cindex style definition @c @defvr {List} style definition @@ -2753,7 +2753,7 @@ You should use @code{c-set-style} instead. The sample @file{.emacs} file provides a concrete example of how a new -style can be added and automatically set. @xref{Sample .emacs File}. +style can be added and automatically set. @xref{Sample Init File}. @end defun @defvar c-style-alist @@ -6760,7 +6760,7 @@ @end defun @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Odds and Ends, Sample .emacs File, Custom Macros, Top +@node Odds and Ends, Sample Init File, Custom Macros, Top @comment node-name, next, previous, up @chapter Odds and Ends @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -6804,9 +6804,9 @@ @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Sample .emacs File, Performance Issues, Odds and Ends, Top +@node Sample Init File, Performance Issues, Odds and Ends, Top @comment node-name, next, previous, up -@appendix Sample .emacs File +@appendix Sample Init File @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Here's a sample .emacs file fragment that might help you along the way. @@ -6863,7 +6863,7 @@ @end verbatim @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Performance Issues, Limitations and Known Bugs, Sample .emacs File, Top +@node Performance Issues, Limitations and Known Bugs, Sample Init File, Top @comment node-name, next, previous, up @chapter Performance Issues @cindex performance === modified file 'doc/misc/edt.texi' --- doc/misc/edt.texi 2013-01-01 09:11:05 +0000 +++ doc/misc/edt.texi 2013-08-13 06:55:21 +0000 @@ -789,13 +789,13 @@ special needs. @menu -* edt-user.el:: Creating your own @file{edt-user.el} file. +* Init file:: Creating your own @file{edt-user.el} file. * Words:: Specifying word entities. * Control keys:: Enabling EDT control key sequence bindings. * Scroll margins:: Setting scroll margins. @end menu -@node edt-user.el +@node Init file @section Creating your own @file{edt-user.el} File A sample @file{edt-user.el} file is provided in the Emacs @file{etc/} === modified file 'doc/misc/epa.texi' --- doc/misc/epa.texi 2013-06-10 05:22:52 +0000 +++ doc/misc/epa.texi 2013-08-13 07:02:00 +0000 @@ -106,7 +106,7 @@ * Cryptographic operations on files:: * Dired integration:: * Mail-mode integration:: -* Encrypting/decrypting *.gpg files:: +* Encrypting/decrypting gpg files:: @end menu @node Key management @@ -346,8 +346,8 @@ @end table -@node Encrypting/decrypting *.gpg files -@section Encrypting/decrypting *.gpg files +@node Encrypting/decrypting gpg files +@section Encrypting/decrypting gpg files By default, every file whose name ends with @samp{.gpg} will be treated as encrypted. That is, when you open such a file, the decrypted text is inserted in the buffer rather than encrypted one. @@ -464,7 +464,7 @@ To set up elisp passphrase cache, set @code{epa-file-cache-passphrase-for-symmetric-encryption}. -@xref{Encrypting/decrypting *.gpg files}. +@xref{Encrypting/decrypting gpg files}. @node Bug Reports @chapter Bug Reports === modified file 'doc/misc/mairix-el.texi' --- doc/misc/mairix-el.texi 2013-03-04 08:45:03 +0000 +++ doc/misc/mairix-el.texi 2013-08-13 07:02:00 +0000 @@ -55,15 +55,15 @@ @end ifnottex @menu -* About mairix and mairix.el:: About the mairix search engine and mairix.el -* Configuring mairix:: How to configure mairix -* Setting up mairix.el:: Set up mairix.el -* Using mairix.el:: List of interactive functions -* Extending mairix.el:: Support your favorite mail reader! +* About:: About the mairix search engine and mairix.el. +* Configuring mairix:: How to configure mairix. +* Setting up the mairix interface:: Set up mairix.el. +* Using:: List of interactive functions +* Extending:: Support your favorite mail reader! * GNU Free Documentation License:: The license for this documentation. @end menu -@node About mairix and mairix.el +@node About @chapter About mairix and mairix.el Mairix is a tool for indexing and searching words in locally stored @@ -98,7 +98,7 @@ with RMail, Gnus, or VM as the Emacs mail program. However, it should also work with Maildir or MH, and it should be very easy to integrate other Emacs mail programs into @code{mairix.el} -(@pxref{Extending mairix.el}). +(@pxref{Extending}). If you use Gnus with maildir or MH, you should really use the native Gnus back end @code{nnmairix} instead, since it is more tightly @@ -165,8 +165,8 @@ Note that this may take a few minutes, but every following index will do the updates incrementally and hence is very fast. -@node Setting up mairix.el -@chapter Setting up mairix.el +@node Setting up the mairix interface +@chapter Setting up the mairix interface First, put @code{mairix.el} in your Emacs search path and put @code{(require 'mairix)} into your @file{.emacs} file. Then, use @@ -179,13 +179,12 @@ nnmairix instead. If you use another Emacs mail program which is not yet supported by -mairix.el, it is pretty easy to integrate it. @xref{Extending -mairix.el}, on how to integrate it into mairix.el. - -Now you should be ready to go. @xref{Using mairix.el}, for the available -commands. - -@node Using mairix.el +mairix.el, it is pretty easy to integrate it. @xref{Extending}, +on how to integrate it into mairix.el. + +Now you should be ready to go. @xref{Using}, for the available commands. + +@node Using @chapter Using mairix.el There are currently no default key bindings for mairix.el, since those @@ -314,7 +313,7 @@ @end table -@node Extending mairix.el +@node Extending @chapter Extending mairix.el Your favorite Emacs mail program is not supported? Shame on me. But === modified file 'doc/misc/reftex.texi' --- doc/misc/reftex.texi 2013-07-25 07:10:56 +0000 +++ doc/misc/reftex.texi 2013-08-13 07:02:00 +0000 @@ -153,7 +153,7 @@ * Defining Label Environments:: ... and environments it doesn't. * Reference Info:: View the label corresponding to a \ref. * Reference Styles:: Macros to be used instead of \ref. -* xr (LaTeX package):: References to external documents. +* LaTeX xr Package:: References to external documents. Defining Label Environments @@ -196,17 +196,17 @@ Options, Keymaps, Hooks -* Options (Table of Contents):: -* Options (Defining Label Environments):: -* Options (Creating Labels):: -* Options (Referencing Labels):: -* Options (Creating Citations):: -* Options (Index Support):: -* Options (Viewing Cross-References):: -* Options (Finding Files):: -* Options (Optimizations):: -* Options (Fontification):: -* Options (Misc):: +* Options - Table of Contents:: +* Options - Defining Label Environments:: +* Options - Creating Labels:: +* Options - Referencing Labels:: +* Options - Creating Citations:: +* Options - Index Support:: +* Options - Viewing Cross-References:: +* Options - Finding Files:: +* Options - Optimizations:: +* Options - Fontification:: +* Options - Misc:: @end detailmenu @end menu @@ -581,8 +581,8 @@ @item mouse-2 @vindex reftex-highlight-selection Clicking with mouse button 2 on a line has the same effect as @key{RET}. -See also variable @code{reftex-highlight-selection}, @ref{Options -(Fontification)}. +See also variable @code{reftex-highlight-selection}, +@ref{Options - Fontification}. @item f @vindex reftex-toc-follow-mode @@ -701,9 +701,8 @@ @item x Switch to the @file{*toc*} buffer of an external document. When the -current document is using the @code{xr} package (@pxref{xr (LaTeX -package)}), @RefTeX{} will switch to one of the external -documents. +current document is using the @code{xr} package (@pxref{LaTeX xr Package}), +@RefTeX{} will switch to one of the external documents. @tablesubheading{Automatic recentering} @@ -796,7 +795,7 @@ * Defining Label Environments:: ... and environments it doesn't. * Reference Info:: View the label corresponding to a \ref. * Reference Styles:: Macros to be used instead of \ref. -* xr (LaTeX package):: References to external documents. +* LaTeX xr Package:: References to external documents. @end menu @node Creating Labels @@ -859,8 +858,8 @@ @vindex reftex-insert-label-flags If you want to change the way certain labels are created, check out the -variable @code{reftex-insert-label-flags} (@pxref{Options (Creating -Labels)}). +variable @code{reftex-insert-label-flags} (@pxref{Options - Creating +Labels}). If you are using @AUCTeX{} to write your @LaTeX{} documents, you can set it up to delegate the creation of labels to @@ -981,7 +980,7 @@ @vindex reftex-highlight-selection Clicking with mouse button 2 on a label will accept it like @key{RET} would. See also variable @code{reftex-highlight-selection}, -@ref{Options (Misc)}. +@ref{Options - Misc}. @vindex reftex-multiref-punctuation @item m - + , @@ -1034,7 +1033,7 @@ @tablesubheading{Controlling what gets displayed} @vindex reftex-label-menu-flags The defaults for the following flags can be configured with the variable -@code{reftex-label-menu-flags} (@pxref{Options (Referencing Labels)}). +@code{reftex-label-menu-flags} (@pxref{Options - Referencing Labels}). @item c Toggle the display of the one-line label definition context in the @@ -1082,8 +1081,7 @@ Reference a label from an external document. With the @LaTeX{} package @code{xr} it is possible to reference labels defined in another document. This key will switch to the label menu of an external -document and let you select a label from there (@pxref{xr (LaTeX -package),,xr}). +document and let you select a label from there (@pxref{LaTeX xr Package,,xr}). @end table @@ -1203,8 +1201,8 @@ @vindex reftex-label-alist @RefTeX{} can be configured to recognize additional labeled environments and macros. This is done with the variable -@code{reftex-label-alist} (@pxref{Options (Defining Label -Environments)}). If you are not familiar with Lisp, you can use the +@code{reftex-label-alist} (@pxref{Options - Defining Label +Environments}). If you are not familiar with Lisp, you can use the @code{custom} library to configure this rather complex variable. To do this, use @@ -1302,8 +1300,7 @@ @code{nil} means to use the text right after the label definition. @item For more complex ways of getting context, see the variable -@code{reftex-label-alist} (@ref{Options (Defining Label -Environments)}). +@code{reftex-label-alist} (@ref{Options - Defining Label Environments}). @end itemize The following list of strings is used to guess the correct label type @@ -1356,9 +1353,8 @@ Depending on how you would like the label insertion and selection for the new environments to work, you might want to add the letters @samp{a} and @samp{h} to some of the flags in the variables -@code{reftex-insert-label-flags} (@pxref{Options (Creating Labels)}) -and @code{reftex-label-menu-flags} (@pxref{Options (Referencing -Labels)}). +@code{reftex-insert-label-flags} (@pxref{Options - Creating Labels}) +and @code{reftex-label-menu-flags} (@pxref{Options - Referencing Labels}). @node Quick Equation @@ -1749,7 +1745,7 @@ these variables are deprecated now. Instead of setting them, the variable @code{reftex-ref-style-default-list} should be adapted now. -@node xr (LaTeX package) +@node LaTeX xr Package @section @code{xr}: Cross-Document References @cindex @code{xr}, LaTeX package @cindex LaTeX packages, @code{xr} @@ -1883,8 +1879,8 @@ @item mouse-2 @vindex reftex-highlight-selection Clicking with mouse button 2 on a citation will accept it like @key{RET} -would. See also variable @code{reftex-highlight-selection}, @ref{Options -(Misc)}. +would. See also variable @code{reftex-highlight-selection}, +@ref{Options - Misc}. @item m Mark the current entry. When one or several entries are marked, @@ -2403,8 +2399,9 @@ The @samp{Find and Index in Document} menu in the phrases buffer also lists a few options for the indexing process. The options have -associated customization variables to set the defaults (@pxref{Options -(Index Support)}). Here is a short explanation of what the options do: +associated customization variables to set the defaults +(@pxref{Options - Index Support}). Here is a short explanation of +what the options do: @table @i @item Match Whole Words @@ -2759,7 +2756,7 @@ @samp{ref} or @samp{refrange}} of the @code{\ref} macro are active for cross-reference display. This works also for labels defined in an external document when the current document refers to them through the -@code{xr} interface (@pxref{xr (LaTeX package)}). +@code{xr} interface (@pxref{LaTeX xr Package}). @item @code{\label} @cindex @code{\label} @@ -2908,7 +2905,7 @@ use faces only when @code{font-lock} is loaded. This seems to be reasonable because people who like faces will very likely have it loaded. If you wish to turn off fontification or change the involved -faces, see @ref{Options (Fontification)}. +faces, see @ref{Options - Fontification}. @node Multifile Documents @section Multifile Documents @@ -3894,21 +3891,21 @@ reftex-customize} will get you there. @menu -* Options (Table of Contents):: -* Options (Defining Label Environments):: -* Options (Creating Labels):: -* Options (Referencing Labels):: -* Options (Creating Citations):: -* Options (Index Support):: -* Options (Viewing Cross-References):: -* Options (Finding Files):: -* Options (Optimizations):: -* Options (Fontification):: -* Options (Misc):: +* Options - Table of Contents:: +* Options - Defining Label Environments:: +* Options - Creating Labels:: +* Options - Referencing Labels:: +* Options - Creating Citations:: +* Options - Index Support:: +* Options - Viewing Cross-References:: +* Options - Finding Files:: +* Options - Optimizations:: +* Options - Fontification:: +* Options - Misc:: * Keymaps and Hooks:: @end menu -@node Options (Table of Contents) +@node Options - Table of Contents @section Table of Contents @cindex Options, table of contents @cindex Table of contents, options @@ -4032,7 +4029,7 @@ (@pxref{Table of Contents}). @end deffn -@node Options (Defining Label Environments) +@node Options - Defining Label Environments @section Defining Label Environments @cindex Options, defining label environments @cindex Defining label environments, options @@ -4259,7 +4256,7 @@ non-footnote labels. @end defopt -@node Options (Creating Labels) +@node Options - Creating Labels @section Creating Labels @cindex Options, creating labels @cindex Creating labels, options @@ -4375,7 +4372,7 @@ @end table @end defopt -@node Options (Referencing Labels) +@node Options - Referencing Labels @section Referencing Labels @cindex Options, referencing labels @cindex Referencing labels, options @@ -4497,7 +4494,7 @@ (@pxref{Referencing Labels}). @end deffn -@node Options (Creating Citations) +@node Options - Creating Citations @section Creating Citations @cindex Options, creating citations @cindex Creating citations, options @@ -4676,7 +4673,7 @@ @end defopt -@node Options (Index Support) +@node Options - Index Support, Options - Viewing Cross-References, Options - Creating Citations, Options @section Index Support @cindex Options, Index support @cindex Index support, options @@ -4896,7 +4893,7 @@ (@pxref{Index Support}). @end deffn -@node Options (Viewing Cross-References) +@node Options - Viewing Cross-References @section Viewing Cross-References @cindex Options, viewing cross-references @cindex Viewing cross-references, options @@ -4955,7 +4952,7 @@ scans. In order to clear it, use @kbd{M-x reftex-reset-mode}. @end defopt -@node Options (Finding Files) +@node Options - Finding Files @section Finding Files @cindex Options, Finding Files @cindex Finding files, options @@ -5045,7 +5042,7 @@ @end defopt @page -@node Options (Optimizations) +@node Options - Optimizations @section Optimizations @cindex Options, optimizations @cindex Optimizations, options @@ -5154,7 +5151,7 @@ non-@code{nil}. @end defopt -@node Options (Fontification) +@node Options - Fontification @section Fontification @cindex Options, fontification @cindex Fontification, options @@ -5252,7 +5249,7 @@ Face name for index entries. @end defopt -@node Options (Misc) +@node Options - Misc @section Miscellaneous @cindex Options, misc === modified file 'etc/ChangeLog' --- etc/ChangeLog 2013-08-11 19:43:36 +0000 +++ etc/ChangeLog 2013-08-13 07:02:00 +0000 @@ -1,3 +1,9 @@ +2013-08-13 Glenn Morris + + * refcards/Makefile (all_pdf, all_ps, fr-survival.ps, dist): + New rules. + (SURVIVAL_CARDS_PDF): Add fr_survival.pdf. + 2013-08-11 Lars Magne Ingebrigtsen * NEWS: Mention -lz and `decompress-gzipped-region'. === modified file 'etc/refcards/Makefile' --- etc/refcards/Makefile 2013-01-01 09:11:05 +0000 +++ etc/refcards/Makefile 2013-08-12 01:14:23 +0000 @@ -23,6 +23,10 @@ ## PDF files that are included with Emacs. all: refcards_pdf dired-refcards_pdf misc-refcards_pdf +all_pdf: all survival-cards_pdf viper-cards_pdf +all_ps: refcards_ps dired-refcards_ps misc-refcards_ps survival-cards_ps \ + viper-cards_ps + REFCARDS_PDF = refcard.pdf cs-refcard.pdf de-refcard.pdf fr-refcard.pdf \ pl-refcard.pdf pt-br-refcard.pdf ru-refcard.pdf sk-refcard.pdf refcards_pdf: ${REFCARDS_PDF} @@ -39,7 +43,7 @@ ## The following files are not included with Emacs. -SURVIVAL_CARDS_PDF = survival.pdf cs-survival.pdf sk-survival.pdf +SURVIVAL_CARDS_PDF = survival.pdf cs-survival.pdf fr-survival.pdf sk-survival.pdf survival-cards_pdf: ${SURVIVAL_CARDS_PDF} survival-cards_ps: ${SURVIVAL_CARDS_PDF:.pdf=.ps} @@ -118,7 +122,7 @@ ## FIXME orgcard.ps does not fit on letter (see orgcard.tex). ## A4, landscape. -de-refcard.ps fr-refcard.ps pt-br-refcard.ps orgcard.ps: %.ps: %.dvi +de-refcard.ps fr-refcard.ps fr-survival.ps pt-br-refcard.ps orgcard.ps: %.ps: %.dvi dvips -t a4 -t landscape $< -o $@ ## A4, portrait. @@ -142,4 +146,12 @@ clean: -rm -f *.dvi *.log *.aux +## For the Emacs website. +dist: + rm -rf emacs-refcards + mkdir emacs-refcards + cp Makefile README *.tex gnus-logo.* pdflayout.sty emacs-refcards/ + tar -cf emacs-refcards.tar emacs-refcards + rm -rf emacs-refcards + ### Makefile ends here ------------------------------------------------------------ revno: 113827 committer: Xue Fuqiao branch nick: trunk timestamp: Tue 2013-08-13 10:45:12 +0800 message: * doc/lispref/frames.texi (Display Feature Testing): Add indexes. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-08-13 02:15:57 +0000 +++ doc/lispref/ChangeLog 2013-08-13 02:45:12 +0000 @@ -1,6 +1,6 @@ 2013-08-13 Xue Fuqiao - * frames.texi (Display Feature Testing): Add an index. + * frames.texi (Display Feature Testing): Add indexes. 2013-08-12 Glenn Morris === modified file 'doc/lispref/frames.texi' --- doc/lispref/frames.texi 2013-08-13 02:15:57 +0000 +++ doc/lispref/frames.texi 2013-08-13 02:45:12 +0000 @@ -2403,6 +2403,7 @@ when the question is inapplicable to a certain kind of display. @end defun +@cindex SaveUnder feature @defun display-save-under &optional display This function returns non-@code{nil} if the display supports the SaveUnder feature. That feature is used by pop-up windows === modified file 'lisp/frame.el' --- lisp/frame.el 2013-08-06 10:59:39 +0000 +++ lisp/frame.el 2013-08-13 02:45:12 +0000 @@ -1442,6 +1442,8 @@ (declare-function x-display-backing-store "xfns.c" (&optional terminal)) +;; In NS port, the return value may be `buffered', `retained', or +;; `non-retained'. See src/nsfns.m. (defun display-backing-store (&optional display) "Return the backing store capability of DISPLAY's screen. The value may be `always', `when-mapped', `not-useful', or nil if ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.