+2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * *.[chm]: Number every assignment to windows_or_buffers_changed so we
+ can track why it is set.
+
2013-11-06 Paul Eggert <eggert@cs.ucla.edu>
Integer-related fixes for term.c etc.
* dispextern.h (face_tty_specified_color): New function.
* term.c (turn_on_face): Don't rely on undefined behavior when
- assigning an out-of-range value to 'long'. Simplify
- test for toggling highlight.
+ assigning an out-of-range value to 'long'.
+ Simplify test for toggling highlight.
(tty_capable_p): Omit last two (unused) args. All callers changed.
* term.c (tty_capable_p, tty_menu_display, tty_menu_add_selection)
(read_menu_input, tty_menu_activate, tty_menu_show):
2013-11-02 Jan Djärv <jan.h.d@swipnet.se>
- * xfaces.c (check_lface_attrs, realize_default_face): Add
- LFACE_DISTANT_FOREGROUND_INDEX (Bug#15788).
+ * xfaces.c (check_lface_attrs, realize_default_face):
+ Add LFACE_DISTANT_FOREGROUND_INDEX (Bug#15788).
(realize_default_face): Set DISTANT_FOREGROUND to unspecified_fg.
2013-11-02 Paul Eggert <eggert@cs.ucla.edu>
foreground.
(syms_of_xfaces): DEFSYM QCdistant_foreground.
- * dispextern.h (lface_attribute_index): Add
- LFACE_DISTANT_FOREGROUND_INDEX.
+ * dispextern.h (lface_attribute_index):
+ Add LFACE_DISTANT_FOREGROUND_INDEX.
2013-11-01 Claudio Bley <claudio.bley@googlemail.com>
- * image.c (pbm_next_char): New function. See
- http://netpbm.sourceforge.net/doc/pbm.html for the details.
+ * image.c (pbm_next_char): New function.
+ See http://netpbm.sourceforge.net/doc/pbm.html for the details.
(pbm_scan_number): Use it.
(Qlibjpeg_version): New variable.
(syms_of_image): DEFSYM and initialize it.
/* If buffer is shown in a window, let redisplay consider other windows. */
if (buffer_window_count (current_buffer))
- ++windows_or_buffers_changed;
+ windows_or_buffers_changed = 10;
/* Copy this buffer's new multibyte status
into all of its indirect buffers. */
{
/* ... it's visible in other window than selected, */
if (buf != XBUFFER (XWINDOW (selected_window)->contents))
- windows_or_buffers_changed = 1;
+ windows_or_buffers_changed = 11;
/* ... or if we modify an overlay at the end of the buffer
and so we cannot be sure that window end is still valid. */
else if (end >= ZV && start <= ZV)
- windows_or_buffers_changed = 1;
+ windows_or_buffers_changed = 12;
}
++BUF_OVERLAY_MODIFF (buf);
clear_frame (f);
clear_current_matrices (f);
update_end (f);
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 13;
/* Mark all windows as inaccurate, so that every window will have
its redisplay done. */
mark_window_display_accurate (FRAME_ROOT_WINDOW (f), 0);
if (nlines != olines)
{
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 14;
FRAME_WINDOW_SIZES_CHANGED (f) = 1;
FRAME_MENU_BAR_LINES (f) = nlines;
set_menu_bar_lines_1 (f->root_window, nlines - olines);
make_frame_visible_1 (f->root_window);
/* Make menu bar update for the Buffers and Frames menus. */
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 15;
XSETFRAME (frame, f);
return frame;
#endif
/* Make menu bar update for the Buffers and Frames menus. */
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 16;
return Qnil;
}
#endif
/* Make menu bar update for the Buffers and Frames menus. */
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 17;
return Qnil;
}
XSETFRAME (frame, f);
x_set_font (f, Fframe_parameter (frame, Qfont), Qnil);
++face_change_count;
- ++windows_or_buffers_changed;
+ windows_or_buffers_changed = 18;
}
}
clear_current_matrices (fr);
}
- ++windows_or_buffers_changed;
+ windows_or_buffers_changed = 19;
}
unblock_input ();
let redisplay consider other windows if this buffer is visible. */
if (XBUFFER (XWINDOW (selected_window)->contents) != current_buffer
&& buffer_window_count (current_buffer))
- ++windows_or_buffers_changed;
+ windows_or_buffers_changed = 20;
if (buffer_intervals (current_buffer))
{
cluster to prevent automatic composition. To recover
the automatic composition, we must update the
display. */
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 21;
if (!already_adjusted)
adjust_point_for_property (last_point_position,
MODIFF != prev_modiff);
resize_mini_window (XWINDOW (window), 0);
/* Enforce full redisplay. FIXME: make it more selective. */
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 22;
/* In case the previous minibuffer displayed in this miniwindow is
dead, we may keep displaying this buffer (tho it's inactive), so reset it,
if (!NILP (f->title))
arg = f->title;
else
- /* explicit name and no icon-name -> explicit_name */
+ /* Explicit name and no icon-name -> explicit_name. */
if (f->explicit_name)
arg = f->name;
else
{
- /* no explicit name and no icon-name ->
- name has to be rebuild from icon_title_format */
- windows_or_buffers_changed++;
+ /* No explicit name and no icon-name ->
+ name has to be rebuild from icon_title_format. */
+ windows_or_buffers_changed = 62;
return;
}
}
/* Don't change the name if it's already NAME. */
- if ([[view window] miniwindowTitle] &&
- ([[[view window] miniwindowTitle]
+ if ([[view window] miniwindowTitle]
+ && ([[[view window] miniwindowTitle]
isEqualToString: [NSString stringWithUTF8String:
- SSDATA (arg)]]))
+ SSDATA (arg)]]))
return;
[[view window] setMiniwindowTitle:
SET_FRAME_ICONIFIED (emacsframe, 0);
SET_FRAME_VISIBLE (emacsframe, 1);
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 63;
if (emacs_event)
{
nlines = 0;
/* Make sure we redisplay all windows in this frame. */
- ++windows_or_buffers_changed;
+ windows_or_buffers_changed = 23;
delta = nlines - FRAME_TOOL_BAR_LINES (f);
select_window_1 (window, inhibit_point_swap);
bset_last_selected_window (XBUFFER (w->contents), window);
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 24;
record_and_return:
/* record_buffer can run QUIT, so make sure it is run only after we have
set_marker_restricted (w->pointm, pos, w->contents);
/* We have to make sure that redisplay updates the window to show
the new value of point. */
- ++windows_or_buffers_changed;
+ windows_or_buffers_changed = 25;
}
return pos;
w->update_mode_line = 1;
if (w != XWINDOW (selected_window))
/* Enforce full redisplay. FIXME: make it more selective. */
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 26;
return pos;
}
}
free_window_matrices (r);
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 27;
Vwindow_list = Qnil;
FRAME_WINDOW_SIZES_CHANGED (f) = 1;
resize_failed = 0;
}
/* Maybe we could move this into the `if' but it's not obviously safe and
I doubt it's worth the trouble. */
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 28;
/* We must select BUFFER for running the window-scroll-functions. */
/* We can't check ! NILP (Vwindow_scroll_functions) here
{
if (NILP (object))
{
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 29;
update_mode_lines++;
return Qt;
}
block_input ();
window_resize_apply (r, horflag);
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 30;
FRAME_WINDOW_SIZES_CHANGED (f) = 1;
adjust_frame_glyphs (f);
}
}
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 31;
}
else
p = XWINDOW (o->parent);
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 32;
FRAME_WINDOW_SIZES_CHANGED (f) = 1;
new = make_window ();
n = XWINDOW (new);
hlinfo->mouse_face_window = Qnil;
}
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 33;
Vwindow_list = Qnil;
FRAME_WINDOW_SIZES_CHANGED (f) = 1;
w->top_line = r->top_line + r->total_lines;
w->total_lines -= XINT (value);
/* Enforce full redisplay. FIXME: make it more selective. */
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 34;
adjust_frame_glyphs (f);
unblock_input ();
}
w->top_line = r->top_line + r->total_lines;
w->total_lines = 1;
/* Enforce full redisplay. FIXME: make it more selective. */
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 35;
adjust_frame_glyphs (f);
unblock_input ();
}
w->total_lines = XFASTINT (w->new_total);
w->top_line = r->top_line + r->total_lines;
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 36;
FRAME_WINDOW_SIZES_CHANGED (f) = 1;
adjust_frame_glyphs (f);
unblock_input ();
Fset_buffer (XWINDOW (selected_window)->contents);
/* Make redisplay consider other windows than just selected_window. */
- ++windows_or_buffers_changed;
+ windows_or_buffers_changed = 37;
}
if (NILP (n))
/* Don't screw up if window_scroll gets an error. */
record_unwind_protect (save_excursion_restore, save_excursion_save ());
- ++windows_or_buffers_changed;
+ windows_or_buffers_changed = 38;
Fset_buffer (w->contents);
SET_PT_BOTH (marker_position (w->pointm), marker_byte_position (w->pointm));
BUF_PT_BYTE (XBUFFER (w->contents)));
}
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 39;
FRAME_WINDOW_SIZES_CHANGED (f) = 1;
/* Problem: Freeing all matrices and later allocating them again
adjust_window_margins (w);
clear_glyph_matrix (w->current_matrix);
w->window_end_valid = 0;
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 40;
adjust_frame_glyphs (XFRAME (WINDOW_FRAME (w)));
}
shown in some window. So we must manually incrementing
windows_or_buffers_changed here to make up for that. */
if (shown)
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 41;
else
windows_or_buffers_changed = old_windows_or_buffers_changed;
message_log_need_newline = !nlflag;
(intptr_t) w, resize_exactly);
if (resized_p)
{
- ++windows_or_buffers_changed;
+ windows_or_buffers_changed = 42;
++update_mode_lines;
redisplay_internal ();
}
frame_garbaged = 0;
if (changed_count)
- ++windows_or_buffers_changed;
+ windows_or_buffers_changed = 43;
}
}
pending input. */
ptrdiff_t count = SPECPDL_INDEX ();
specbind (Qredisplay_dont_pause, Qt);
- windows_or_buffers_changed = 1;
+ windows_or_buffers_changed = 44;
redisplay_internal ();
unbind_to (count, Qnil);
}
redisplay displays the minibuffer, so that the cursor will
be replaced with what the minibuffer wants. */
if (cursor_in_echo_area)
- ++windows_or_buffers_changed;
+ windows_or_buffers_changed = 45;
}
}
else if (!EQ (mini_window, selected_window))
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 46;
/* Last displayed message is now the current message. */
echo_area_buffer[1] = echo_area_buffer[0];
realized faces, which includes the faces referenced from current
matrices. So, we can't reuse current matrices in this case. */
if (face_change_count)
- ++windows_or_buffers_changed;
+ windows_or_buffers_changed = 47;
if ((FRAME_TERMCAP_P (sf) || FRAME_MSDOS_P (sf))
&& FRAME_TTY (sf)->previous_frame != sf)
/* Since frames on a single ASCII terminal share the same
display area, displaying a different frame means redisplay
the whole thing. */
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 48;
SET_FRAME_GARBAGED (sf);
#ifndef DOS_NT
set_tty_color_mode (FRAME_TTY (sf), sf);
/* If specs for an arrow have changed, do thorough redisplay
to ensure we remove any arrow that should no longer exist. */
if (overlay_arrows_changed_p ())
- consider_all_windows_p = windows_or_buffers_changed = 1;
+ consider_all_windows_p = windows_or_buffers_changed = 49;
/* Normally the message* functions will have already displayed and
updated the echo area, but the frame may have been trashed, or
{
consider_all_windows_p = 1;
++update_mode_lines;
- ++windows_or_buffers_changed;
+ windows_or_buffers_changed = 50;
/* If window configuration was changed, frames may have been
marked garbaged. Clear them or we will experience
needs to be rewritten with two variables, consider_all_windows and
consider_all_frames. */
consider_all_windows_p = 1;
- ++windows_or_buffers_changed;
+ windows_or_buffers_changed = 51;
++update_mode_lines;
/* If window configuration was changed, frames may have been
}
if (new_count != number_of_visible_frames)
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 52;
}
/* Change frame size now if a change is pending. */
{
clear_face_cache (!NILP (thoroughly));
++face_change_count;
- ++windows_or_buffers_changed;
+ windows_or_buffers_changed = 53;
return Qnil;
}
if (NILP (Fget (face, Qface_no_inherit)))
{
++face_change_count;
- ++windows_or_buffers_changed;
+ windows_or_buffers_changed = 54;
}
eassert (LFACEP (lface));
if (NILP (Fget (to, Qface_no_inherit)))
{
++face_change_count;
- ++windows_or_buffers_changed;
+ windows_or_buffers_changed = 55;
}
return to;
&& NILP (Fequal (old_value, value)))
{
++face_change_count;
- ++windows_or_buffers_changed;
+ windows_or_buffers_changed = 56;
}
if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)
{
#ifdef HAVE_WINDOW_SYSTEM
/* Changed font-related attributes of the `default' face are
- reflected in changed `font' frame parameters. */
+ reflected in changed `font' frame parameters. */
if (FRAMEP (frame)
&& (prop_index || EQ (attr, QCfont))
&& lface_fully_specified_p (XVECTOR (lface)->contents))
&& NILP (Fget (face, Qface_no_inherit)))
{
++face_change_count;
- ++windows_or_buffers_changed;
+ windows_or_buffers_changed = 57;
}
}
if (WINDOWP (f->root_window))
{
clear_current_matrices (f);
- ++windows_or_buffers_changed;
+ windows_or_buffers_changed = 58;
}
unblock_input ();
nlines = 0;
/* Make sure we redisplay all windows in this frame. */
- windows_or_buffers_changed++;
+ windows_or_buffers_changed = 59;
#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
FRAME_MENU_BAR_LINES (f) = 0;
#else /* !USE_GTK */
- /* Make sure we redisplay all windows in this frame. */
- ++windows_or_buffers_changed;
+ /* Make sure we redisplay all windows in this frame. */
+ windows_or_buffers_changed = 60;
delta = nlines - FRAME_TOOL_BAR_LINES (f);