emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115299: * src/xdisp.c (redisplay_internal): Don't c


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r115299: * src/xdisp.c (redisplay_internal): Don't call set_window_update_flags.
Date: Sat, 30 Nov 2013 04:04:34 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115299
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15999
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2013-11-29 23:04:18 -0500
message:
  * src/xdisp.c (redisplay_internal): Don't call set_window_update_flags.
  Set invisible frames's `redisplay' when a full redisplay is requested.
  (redisplay_window): Set must_be_updated_p instead.
  (redisplay_mode_lines): Don't set must_be_updated_p any more.
  (display_mode_lines): Set it here instead.
  * src/dispextern.h (set_window_update_flags): Remove.
  * src/dispnew.c (set_window_update_flags): Remove `b' argument; make static.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/dispextern.h               
dispextern.h-20091113204419-o5vbwnq5f7feedwu-218
  src/dispnew.c                  dispnew.c-20091113204419-o5vbwnq5f7feedwu-258
  src/lisp.h                     lisp.h-20091113204419-o5vbwnq5f7feedwu-253
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
  src/xterm.c                    xterm.c-20091113204419-o5vbwnq5f7feedwu-244
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-11-29 19:47:58 +0000
+++ b/src/ChangeLog     2013-11-30 04:04:18 +0000
@@ -1,3 +1,15 @@
+2013-11-30  Stefan Monnier  <address@hidden>
+
+       * xdisp.c (redisplay_internal): Don't call set_window_update_flags.
+       Set invisible frames's `redisplay' when a full redisplay is requested.
+       (redisplay_window): Set must_be_updated_p instead (bug#15999).
+       (redisplay_mode_lines): Don't set must_be_updated_p any more.
+       (display_mode_lines): Set it here instead.
+
+       * dispnew.c (set_window_update_flags): Remove `b' argument; make static.
+
+       * dispextern.h (set_window_update_flags): Remove.
+
 2013-11-29  Stefan Monnier  <address@hidden>
 
        * fns.c (internal_equal): Add a hash_table argument to handle cycles.

=== modified file 'src/dispextern.h'
--- a/src/dispextern.h  2013-11-06 00:14:56 +0000
+++ b/src/dispextern.h  2013-11-30 04:04:18 +0000
@@ -3462,7 +3462,6 @@
 void clear_glyph_matrix_rows (struct glyph_matrix *, int, int);
 void clear_glyph_row (struct glyph_row *);
 void prepare_desired_row (struct glyph_row *);
-void set_window_update_flags (struct window *, struct buffer *, bool);
 void update_single_window (struct window *, bool);
 void do_pending_window_change (bool);
 void change_frame_size (struct frame *, int, int, bool, bool, bool);

=== modified file 'src/dispnew.c'
--- a/src/dispnew.c     2013-11-06 04:11:04 +0000
+++ b/src/dispnew.c     2013-11-30 04:04:18 +0000
@@ -97,6 +97,7 @@
 static void set_window_cursor_after_update (struct window *);
 static void adjust_frame_glyphs_for_window_redisplay (struct frame *);
 static void adjust_frame_glyphs_for_frame_redisplay (struct frame *);
+static void set_window_update_flags (struct window *w, bool on_p);
 
 /* True means last display completed.  False means it was preempted.  */
 
@@ -2944,8 +2945,8 @@
   /* Mark all windows as inaccurate, so that every window will have
      its redisplay done.  */
   mark_window_display_accurate (FRAME_ROOT_WINDOW (f), 0);
-  set_window_update_flags (XWINDOW (FRAME_ROOT_WINDOW (f)), NULL, 1);
-  f->garbaged = 0;
+  set_window_update_flags (XWINDOW (FRAME_ROOT_WINDOW (f)), true);
+  f->garbaged = false;
 }
 
 DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 0, 1, 0,
@@ -3029,7 +3030,7 @@
              Lisp_Object tem;
 
              update_window (w, 1);
-             w->must_be_updated_p = 0;
+             w->must_be_updated_p = false;
 
              /* Swap tool-bar strings.  We swap because we want to
                 reuse strings.  */
@@ -3075,7 +3076,7 @@
 
  do_pause:
   /* Reset flags indicating that a window should be updated.  */
-  set_window_update_flags (root_window, NULL, 0);
+  set_window_update_flags (root_window, false);
 
   display_completed = !paused_p;
   return paused_p;
@@ -3098,7 +3099,7 @@
      frame matrix we operate.  */
   set_frame_matrix_frame (f);
 
-  /* Update the display  */
+  /* Update the display.  */
   update_begin (f);
   /* Force update_frame_1 not to stop due to pending input, and not
      try scrolling.  */
@@ -3122,7 +3123,7 @@
 #endif
 
   /* Reset flags indicating that a window should be updated.  */
-  set_window_update_flags (root_window, NULL, 0);
+  set_window_update_flags (root_window, false);
 }
 
 
@@ -3174,7 +3175,7 @@
       update_end (f);
 
       /* Reset flag in W.  */
-      w->must_be_updated_p = 0;
+      w->must_be_updated_p = false;
     }
 }
 
@@ -3897,18 +3898,17 @@
 }
 
 
-/* If B is NULL, set WINDOW->must_be_updated_p to ON_P for all windows in
-   the window tree rooted at W.  Otherwise set WINDOW->must_be_updated_p
-   to ON_P only for windows that displays B.  */
+/* Set WINDOW->must_be_updated_p to ON_P for all windows in
+   the window tree rooted at W.  */
 
-void
-set_window_update_flags (struct window *w, struct buffer *b, bool on_p)
+static void
+set_window_update_flags (struct window *w, bool on_p)
 {
   while (w)
     {
       if (WINDOWP (w->contents))
-       set_window_update_flags (XWINDOW (w->contents), b, on_p);
-      else if (!(b && b != XBUFFER (w->contents)))
+       set_window_update_flags (XWINDOW (w->contents), on_p);
+      else
        w->must_be_updated_p = on_p;
 
       w = NILP (w->next) ? 0 : XWINDOW (w->next);

=== modified file 'src/lisp.h'
--- a/src/lisp.h        2013-11-23 01:55:16 +0000
+++ b/src/lisp.h        2013-11-30 04:04:18 +0000
@@ -3523,7 +3523,7 @@
 extern Lisp_Object restore_message_unwind (Lisp_Object);
 extern void restore_message (void);
 extern Lisp_Object current_message (void);
-extern void clear_message (int, int);
+extern void clear_message (bool, bool);
 extern void message (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2);
 extern void message1 (const char *);
 extern void message1_nolog (const char *);

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2013-11-29 18:20:24 +0000
+++ b/src/xdisp.c       2013-11-30 04:04:18 +0000
@@ -835,7 +835,7 @@
 static int display_prop_string_p (Lisp_Object, Lisp_Object);
 static int row_for_charpos_p (struct glyph_row *, ptrdiff_t);
 static int cursor_row_p (struct glyph_row *);
-static int redisplay_mode_lines (Lisp_Object, int);
+static int redisplay_mode_lines (Lisp_Object, bool);
 static char *decode_mode_spec_coding (Lisp_Object, char *, int);
 
 static Lisp_Object get_it_property (struct it *it, Lisp_Object prop);
@@ -889,7 +889,7 @@
 static void redisplay_internal (void);
 static int echo_area_display (int);
 static void redisplay_windows (Lisp_Object);
-static void redisplay_window (Lisp_Object, int);
+static void redisplay_window (Lisp_Object, bool);
 static Lisp_Object redisplay_window_error (Lisp_Object);
 static Lisp_Object redisplay_window_0 (Lisp_Object);
 static Lisp_Object redisplay_window_1 (Lisp_Object);
@@ -1429,7 +1429,7 @@
       if (top_y < window_top_y)
        visible_p = bottom_y > window_top_y;
       else if (top_y < it.last_visible_y)
-       visible_p = 1;
+       visible_p = true;
       if (bottom_y >= it.last_visible_y
          && it.bidi_p && it.bidi_it.scan_dir == -1
          && IT_CHARPOS (it) < charpos)
@@ -1667,7 +1667,7 @@
       if (charpos < IT_CHARPOS (it)
          || (it.what == IT_EOB && charpos == IT_CHARPOS (it)))
        {
-         visible_p = 1;
+         visible_p = true;
          RESTORE_IT (&it2, &it2, it2data);
          move_it_to (&it2, charpos, -1, -1, -1, MOVE_TO_POS);
          *x = it2.current_x;
@@ -2913,7 +2913,7 @@
         with a left box line.  */
       face = FACE_FROM_ID (it->f, remapped_base_face_id);
       if (face->box != FACE_NO_BOX)
-       it->start_of_box_run_p = 1;
+       it->start_of_box_run_p = true;
     }
 
   /* If a buffer position was specified, set the iterator there,
@@ -3341,7 +3341,7 @@
                pop_it (it);
              else
                {
-                 it->ignore_overlay_strings_at_pos_p = 1;
+                 it->ignore_overlay_strings_at_pos_p = true;
                  it->string_from_display_prop_p = 0;
                  it->from_disp_prop_p = 0;
                  handle_overlay_change_p = 0;
@@ -4206,13 +4206,13 @@
                  prop = Fget_text_property (end_charpos, Qinvisible, 
it->string);
                  invis_p = TEXT_PROP_MEANS_INVISIBLE (prop);
                  if (invis_p == 2)
-                   display_ellipsis_p = 1;
+                   display_ellipsis_p = true;
                }
            }
          while (invis_p && endpos < len);
 
          if (display_ellipsis_p)
-           it->ellipsis_p = 1;
+           it->ellipsis_p = true;
 
          if (endpos < len)
            {
@@ -4324,9 +4324,9 @@
                tem = next_stop;
 
               /* If there are adjacent invisible texts, don't lose the
-                 second one's ellipsis. */
+                 second one's ellipsis.  */
               if (invis_p == 2)
-                display_ellipsis_p = 1;
+                display_ellipsis_p = true;
            }
          while (invis_p);
 
@@ -4334,10 +4334,10 @@
          if (it->bidi_p)
            {
              ptrdiff_t bpos = CHAR_TO_BYTE (newpos);
-             int on_newline =
-               bpos == ZV_BYTE || FETCH_BYTE (bpos) == '\n';
-             int after_newline =
-               newpos <= BEGV || FETCH_BYTE (bpos - 1) == '\n';
+             int on_newline
+               = bpos == ZV_BYTE || FETCH_BYTE (bpos) == '\n';
+             int after_newline
+               = newpos <= BEGV || FETCH_BYTE (bpos - 1) == '\n';
 
              /* If the invisible text ends on a newline or on a
                 character after a newline, we can avoid the costly,
@@ -4444,7 +4444,7 @@
                  it->position.charpos = newpos - 1;
                  it->position.bytepos = CHAR_TO_BYTE (it->position.charpos);
                }
-             it->ellipsis_p = 1;
+             it->ellipsis_p = true;
              /* Let the ellipsis display before
                 considering any properties of the following char.
                 Fixes address@hidden 01 Oct 07 bug.  */
@@ -4489,7 +4489,7 @@
     it->saved_face_id = it->face_id = DEFAULT_FACE_ID;
 
   it->method = GET_FROM_DISPLAY_VECTOR;
-  it->ellipsis_p = 1;
+  it->ellipsis_p = true;
 }
 
 
@@ -4958,7 +4958,7 @@
          it->method = GET_FROM_IMAGE;
          it->from_overlay = Qnil;
          it->face_id = face_id;
-         it->from_disp_prop_p = 1;
+         it->from_disp_prop_p = true;
 
          /* Say that we haven't consumed the characters with
             `display' property yet.  The call to pop_it in
@@ -5040,7 +5040,7 @@
         when we are finished with the glyph property value.  */
       push_it (it, position);
       it->from_overlay = overlay;
-      it->from_disp_prop_p = 1;
+      it->from_disp_prop_p = true;
 
       if (NILP (location))
        it->area = TEXT_AREA;
@@ -5060,7 +5060,7 @@
          it->stop_charpos = 0;
          it->prev_stop = 0;
          it->base_level_stop = 0;
-         it->string_from_display_prop_p = 1;
+         it->string_from_display_prop_p = true;
          /* Say that we haven't consumed the characters with
             `display' property yet.  The call to pop_it in
             set_iterator_to_next will clean this up.  */
@@ -5426,7 +5426,7 @@
         processed the overlay strings there already, so that
         next_element_from_buffer doesn't try it again.  */
       if (NILP (it->string) && IT_CHARPOS (*it) >= it->end_charpos)
-       it->overlay_strings_at_end_processed_p = 1;
+       it->overlay_strings_at_end_processed_p = true;
     }
   else
     {
@@ -6109,7 +6109,7 @@
              if (bidi_it_prev)
                *bidi_it_prev = bprev;
            }
-         *skipped_p = newline_found_p = 1;
+         *skipped_p = newline_found_p = true;
        }
       else
        {
@@ -6799,9 +6799,9 @@
          if (! ASCII_CHAR_P (c) && ! NILP (Vnobreak_char_display))
            {
              if (c == 0xA0)
-               nonascii_space_p = 1;
+               nonascii_space_p = true;
              else if (c == 0xAD || c == 0x2010 || c == 0x2011)
-               nonascii_hyphen_p = 1;
+               nonascii_hyphen_p = true;
            }
 
          /* Translate control characters into `\003' or `^C' form.
@@ -7260,12 +7260,12 @@
              if (it->method == GET_FROM_STRING
                  && it->current.overlay_string_index >= 0
                  && it->n_overlay_strings > 0)
-               it->ignore_overlay_strings_at_pos_p = 1;
+               it->ignore_overlay_strings_at_pos_p = true;
              it->len = it->dpvec_char_len;
              set_iterator_to_next (it, reseat_p);
            }
 
-         /* Maybe recheck faces after display vector */
+         /* Maybe recheck faces after display vector.  */
          if (recheck_faces)
            it->stop_charpos = IT_CHARPOS (*it);
        }
@@ -7290,7 +7290,7 @@
       else
        {
          /* Not an overlay string.  There could be padding, so test
-            against it->end_charpos . */
+            against it->end_charpos.  */
          if (IT_STRING_CHARPOS (*it) >= it->end_charpos)
            goto consider_string_end;
        }
@@ -7802,7 +7802,7 @@
 static int
 next_element_from_c_string (struct it *it)
 {
-  int success_p = 1;
+  bool success_p = true;
 
   eassert (it->s);
   eassert (!it->bidi_p || it->s == it->bidi_it.string.s);
@@ -7861,7 +7861,7 @@
       it->method = GET_FROM_BUFFER;
       it->object = it->w->contents;
       reseat_at_next_visible_line_start (it, 1);
-      it->face_before_selective_p = 1;
+      it->face_before_selective_p = true;
     }
 
   return GET_NEXT_DISPLAY_ELEMENT (it);
@@ -7930,7 +7930,7 @@
     it->prev_stop = it->stop_charpos;
   else
     it->prev_stop = BEGV;
-  it->bidi_p = 1;
+  it->bidi_p = true;
   it->current = save_current;
   it->position = save_position;
   it->stop_charpos = save_stop_pos;
@@ -7976,7 +7976,7 @@
     }
   while (charpos <= where_we_are);
 
-  it->bidi_p = 1;
+  it->bidi_p = true;
   it->current = save_current;
   it->position = save_position;
   next_stop = it->stop_charpos;
@@ -7993,7 +7993,7 @@
 static int
 next_element_from_buffer (struct it *it)
 {
-  int success_p = 1;
+  bool success_p = true;
 
   eassert (IT_CHARPOS (*it) >= BEGV);
   eassert (NILP (it->string) && !it->s);
@@ -8023,7 +8023,7 @@
            overlay_strings_follow_p = 0;
          else
            {
-             it->overlay_strings_at_end_processed_p = 1;
+             it->overlay_strings_at_end_processed_p = true;
              overlay_strings_follow_p = get_overlay_strings (it, 0);
            }
 
@@ -9746,7 +9746,7 @@
   struct gcpro gcpro1;
 
   GCPRO1 (m);
-  clear_message (1,1);
+  clear_message (true, true);
   cancel_echoing ();
 
   /* First flush out any partial line written with print.  */
@@ -9816,7 +9816,7 @@
          echo_message_buffer = Qnil;
        }
       else
-       clear_message (1, 1);
+       clear_message (true, true);
 
       do_pending_window_change (0);
       echo_area_display (1);
@@ -10089,7 +10089,7 @@
   else
     {
       this_one = 0, the_other = 1;
-      clear_buffer_p = 1;
+      clear_buffer_p = true;
 
       /* We need a fresh one in case the current echo buffer equals
         the one containing the last displayed echo area message.  */
@@ -10106,7 +10106,7 @@
        = (EQ (echo_area_buffer[the_other], echo_buffer[this_one])
           ? echo_buffer[the_other]
           : echo_buffer[this_one]);
-      clear_buffer_p = 1;
+      clear_buffer_p = true;
     }
 
   buffer = echo_area_buffer[this_one];
@@ -10732,12 +10732,12 @@
    last displayed.  */
 
 void
-clear_message (int current_p, int last_displayed_p)
+clear_message (bool current_p, bool last_displayed_p)
 {
   if (current_p)
     {
       echo_area_buffer[0] = Qnil;
-      message_cleared_p = 1;
+      message_cleared_p = true;
     }
 
   if (last_displayed_p)
@@ -10819,7 +10819,7 @@
     {
       echo_area_window = mini_window;
       window_height_changed_p = display_echo_area (w);
-      w->must_be_updated_p = 1;
+      w->must_be_updated_p = true;
 
       /* Update the display, unless called from redisplay_internal.
         Also don't update the screen during redisplay itself.  The
@@ -10835,7 +10835,7 @@
             been called, so that mode lines above the echo area are
             garbaged.  This looks odd, so we prevent it here.  */
          if (!display_completed)
-           n = redisplay_mode_lines (FRAME_ROOT_WINDOW (f), 0);
+           n = redisplay_mode_lines (FRAME_ROOT_WINDOW (f), false);
 
          if (window_height_changed_p
              /* Don't do this if Emacs is shutting down.  Redisplay
@@ -12453,7 +12453,7 @@
              /* For left-to-right rows, hscroll when cursor is either
                 (i) inside the right hscroll margin, or (ii) if it is
                 inside the left margin and the window is already
-                hscrolled. */
+                hscrolled.  */
              && ((!row_r2l_p
                   && ((w->hscroll
                        && w->cursor.x <= h_margin)
@@ -12470,7 +12470,7 @@
                      && ((cursor_row->enabled_p
                           /* FIXME: It is confusing to set the
                              truncated_on_right_p flag when R2L rows
-                             are actually truncated on the left. */
+                             are actually truncated on the left.  */
                           && cursor_row->truncated_on_right_p
                           && w->cursor.x <= h_margin)
                          || (w->hscroll
@@ -13425,6 +13425,10 @@
 
              if (FRAME_VISIBLE_P (f) && !FRAME_OBSCURED_P (f))
                redisplay_windows (FRAME_ROOT_WINDOW (f));
+             /* Remember that the invisible frames need to be redisplayed next
+                time they're visible.  */
+             else if (!REDISPLAY_SOME_P ())
+               f->redisplay = true;
 
              /* The X error handler may have deleted that frame.  */
              if (!FRAME_LIVE_P (f))
@@ -13455,19 +13459,11 @@
 
                  /* Prevent various kinds of signals during display
                     update.  stdio is not robust about handling
-                    signals, which can cause an apparent I/O
-                    error.  */
+                    signals, which can cause an apparent I/O error.  */
                  if (interrupt_input)
                    unrequest_sigio ();
                  STOP_POLLING;
 
-                 /* Mark windows on frame F to update.  If we decide to
-                    update all frames but windows_or_buffers_changed is
-                    zero, we assume that only the windows that shows
-                    current buffer should be really updated.  */
-                 set_window_update_flags
-                   (XWINDOW (f->root_window),
-                    (windows_or_buffers_changed ? NULL : current_buffer), 1);
                  pending |= update_frame (f, 0, 0);
                  f->cursor_type_changed = 0;
                  f->updated_p = 1;
@@ -13530,7 +13526,7 @@
          if (hscroll_windows (selected_window))
            goto retry;
 
-         XWINDOW (selected_window)->must_be_updated_p = 1;
+         XWINDOW (selected_window)->must_be_updated_p = true;
          pending = update_frame (sf, 0, 0);
          sf->cursor_type_changed = 0;
        }
@@ -13545,7 +13541,7 @@
 
       if (mini_frame != sf && FRAME_WINDOW_P (mini_frame))
        {
-         XWINDOW (mini_window)->must_be_updated_p = 1;
+         XWINDOW (mini_window)->must_be_updated_p = true;
          pending |= update_frame (mini_frame, 0, 0);
          mini_frame->cursor_type_changed = 0;
          if (!pending && hscroll_windows (mini_window))
@@ -13846,7 +13842,7 @@
 redisplay_window_0 (Lisp_Object window)
 {
   if (displayed_buffer->display_error_modiff < BUF_MODIFF (displayed_buffer))
-    redisplay_window (window, 0);
+    redisplay_window (window, false);
   return Qnil;
 }
 
@@ -13854,7 +13850,7 @@
 redisplay_window_1 (Lisp_Object window)
 {
   if (displayed_buffer->display_error_modiff < BUF_MODIFF (displayed_buffer))
-    redisplay_window (window, 1);
+    redisplay_window (window, true);
   return Qnil;
 }
 
@@ -15380,7 +15376,7 @@
    changed on window's frame.  In that case, redisplay_internal will retry.  */
 
 static void
-redisplay_window (Lisp_Object window, int just_this_one_p)
+redisplay_window (Lisp_Object window, bool just_this_one_p)
 {
   struct window *w = XWINDOW (window);
   struct frame *f = XFRAME (w->frame);
@@ -15391,11 +15387,11 @@
   int tem;
   struct it it;
   /* Record it now because it's overwritten.  */
-  int current_matrix_up_to_date_p = 0;
-  int used_current_matrix_p = 0;
+  bool current_matrix_up_to_date_p = false;
+  bool used_current_matrix_p = false;
   /* This is less strict than current_matrix_up_to_date_p.
      It indicates that the buffer contents and narrowing are unchanged.  */
-  int buffer_unchanged_p = 0;
+  bool buffer_unchanged_p = false;
   int temp_scroll_step = 0;
   ptrdiff_t count = SPECPDL_INDEX ();
   int rc;
@@ -15432,6 +15428,11 @@
                      || buffer->clip_changed
                      || buffer->prevent_redisplay_optimizations_p);
 
+  if (!just_this_one_p)
+    /* If `just_this_one_p' is set, we apparently set must_be_updated_p more
+       cleverly elsewhere.  */
+    w->must_be_updated_p = true;
+
   if (MINI_WINDOW_P (w))
     {
       if (w == XWINDOW (echo_area_window)
@@ -15512,10 +15513,10 @@
       if (XMARKER (w->start)->buffer == current_buffer)
        compute_window_start_on_continuation_line (w);
 
-      w->window_end_valid = 0;
+      w->window_end_valid = false;
       /* If so, we also can't rely on current matrix
         and should not fool try_cursor_movement below.  */
-      current_matrix_up_to_date_p = 0;
+      current_matrix_up_to_date_p = false;
     }
 
   /* Some sanity checks.  */
@@ -16133,7 +16134,7 @@
 
   SET_TEXT_POS_FROM_MARKER (startp, w->start);
   w->start_at_line_beg = (CHARPOS (startp) == BEGV
-                           || FETCH_BYTE (BYTEPOS (startp) - 1) == '\n');
+                         || FETCH_BYTE (BYTEPOS (startp) - 1) == '\n');
 
   /* Display the mode line, if we must.  */
   if ((update_mode_line
@@ -16153,6 +16154,7 @@
       && (WINDOW_WANTS_MODELINE_P (w)
          || WINDOW_WANTS_HEADER_LINE_P (w)))
     {
+
       display_mode_lines (w);
 
       /* If mode line height has changed, arrange for a thorough
@@ -16273,7 +16275,7 @@
 
   set_buffer_internal_1 (old);
   /* Avoid an abort in TEMP_SET_PT_BOTH if the buffer has become
-     shorter.  This can be caused by log truncation in *Messages*. */
+     shorter.  This can be caused by log truncation in *Messages*.  */
   if (CHARPOS (lpoint) <= ZV)
     TEMP_SET_PT_BOTH (CHARPOS (lpoint), BYTEPOS (lpoint));
 
@@ -20740,7 +20742,7 @@
    the number of windows whose mode lines were redisplayed.  */
 
 static int
-redisplay_mode_lines (Lisp_Object window, int force)
+redisplay_mode_lines (Lisp_Object window, bool force)
 {
   int nwindows = 0;
 
@@ -20774,10 +20776,7 @@
          /* Display mode lines.  */
          clear_glyph_matrix (w->desired_matrix);
          if (display_mode_lines (w))
-           {
-             ++nwindows;
-             w->must_be_updated_p = 1;
-           }
+           ++nwindows;
 
          /* Restore old settings.  */
          set_buffer_internal_1 (old);
@@ -20833,6 +20832,8 @@
   XFRAME (new_frame)->selected_window = old_frame_selected_window;
   selected_frame = old_selected_frame;
   selected_window = old_selected_window;
+  if (n > 0)
+    w->must_be_updated_p = true;
   return n;
 }
 

=== modified file 'src/xterm.c'
--- a/src/xterm.c       2013-11-29 01:22:40 +0000
+++ b/src/xterm.c       2013-11-30 04:04:18 +0000
@@ -98,7 +98,7 @@
 
 #ifdef USE_TOOLKIT_SCROLL_BARS
 #if defined USE_MOTIF
-#include <Xm/Xm.h>             /* for LESSTIF_VERSION */
+#include <Xm/Xm.h>             /* For LESSTIF_VERSION */
 #include <Xm/ScrollBar.h>
 #else /* !USE_MOTIF i.e. use Xaw */
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]