emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r103786: src/xdisp.c: Remove unused p


From: Juanma Barranquero
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103786: src/xdisp.c: Remove unused parameters.
Date: Thu, 31 Mar 2011 03:37:51 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103786
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Thu 2011-03-31 03:37:51 +0200
message:
  src/xdisp.c: Remove unused parameters.
  
  * dispextern.h (move_it_by_lines):
  * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
    since revno:34925 (2000-12-29).  All callers changed.
    (message_log_check_duplicate): Remove parameters `prev_bol' and
    `this_bol', unused since revno:20537 (1998-01-01).  All callers changed.
    (redisplay_internal): Remove parameter `preserve_echo_area',
    unused since revno:25013 (1999-07-21).  All callers changed.
  * indent.c (Fvertical_motion):
  * window.c (window_scroll_pixel_based, Frecenter):
    Don't pass `need_y_p' to `move_it_by_lines'.
modified:
  src/ChangeLog
  src/dispextern.h
  src/indent.c
  src/window.c
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-03-30 19:18:12 +0000
+++ b/src/ChangeLog     2011-03-31 01:37:51 +0000
@@ -1,3 +1,17 @@
+2011-03-31  Juanma Barranquero  <address@hidden>
+
+       * dispextern.h (move_it_by_lines):
+       * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
+       since revno:34925 (2000-12-29).  All callers changed.
+       (message_log_check_duplicate): Remove parameters `prev_bol' and
+       `this_bol', unused since revno:20537 (1998-01-01).  All callers changed.
+       (redisplay_internal): Remove parameter `preserve_echo_area',
+       unused since revno:25013 (1999-07-21).  All callers changed.
+
+       * indent.c (Fvertical_motion):
+       * window.c (window_scroll_pixel_based, Frecenter):
+       Don't pass `need_y_p' to `move_it_by_lines'.
+
 2011-03-30  Stefan Monnier  <address@hidden>
 
        * eval.c (struct backtrace): Don't cheat with negative numbers, but do

=== modified file 'src/dispextern.h'
--- a/src/dispextern.h  2011-03-28 03:29:18 +0000
+++ b/src/dispextern.h  2011-03-31 01:37:51 +0000
@@ -2988,7 +2988,7 @@
 void move_it_to (struct it *, EMACS_INT, int, int, int, int);
 void move_it_vertically (struct it *, int);
 void move_it_vertically_backward (struct it *, int);
-void move_it_by_lines (struct it *, int, int);
+void move_it_by_lines (struct it *, int);
 void move_it_past_eol (struct it *);
 void move_it_in_display_line (struct it *it,
                              EMACS_INT to_charpos, int to_x,

=== modified file 'src/indent.c'
--- a/src/indent.c      2011-03-15 17:59:31 +0000
+++ b/src/indent.c      2011-03-31 01:37:51 +0000
@@ -2072,7 +2072,7 @@
          /* Do this even if LINES is 0, so that we move back to the
             beginning of the current line as we ought.  */
          if (XINT (lines) == 0 || IT_CHARPOS (it) > 0)
-           move_it_by_lines (&it, XINT (lines), 0);
+           move_it_by_lines (&it, XINT (lines));
        }
       else
        {
@@ -2090,9 +2090,9 @@
                  || (it_overshoot_expected < 0
                      && it.method == GET_FROM_BUFFER
                      && it.c == '\n'))
-               move_it_by_lines (&it, -1, 0);
+               move_it_by_lines (&it, -1);
              it.vpos = 0;
-             move_it_by_lines (&it, XINT (lines), 0);
+             move_it_by_lines (&it, XINT (lines));
            }
          else
            {
@@ -2105,15 +2105,15 @@
                  while (IT_CHARPOS (it) <= it_start)
                    {
                      it.vpos = 0;
-                     move_it_by_lines (&it, 1, 0);
+                     move_it_by_lines (&it, 1);
                    }
                  if (XINT (lines) > 1)
-                   move_it_by_lines (&it, XINT (lines) - 1, 0);
+                   move_it_by_lines (&it, XINT (lines) - 1);
                }
              else
                {
                  it.vpos = 0;
-                 move_it_by_lines (&it, XINT (lines), 0);
+                 move_it_by_lines (&it, XINT (lines));
                }
            }
        }

=== modified file 'src/window.c'
--- a/src/window.c      2011-03-29 06:59:27 +0000
+++ b/src/window.c      2011-03-31 01:37:51 +0000
@@ -4858,7 +4858,7 @@
             looking at an image that is taller that the window height.  */
          while (start_pos == IT_CHARPOS (it)
                 && start_pos > BEGV)
-           move_it_by_lines (&it, -1, 1);
+           move_it_by_lines (&it, -1);
        }
       else if (dy > 0)
        {
@@ -4868,11 +4868,11 @@
             looking at an image that is taller that the window height.  */
          while (start_pos == IT_CHARPOS (it)
                 && start_pos < ZV)
-           move_it_by_lines (&it, 1, 1);
+           move_it_by_lines (&it, 1);
        }
     }
   else
-    move_it_by_lines (&it, n, 1);
+    move_it_by_lines (&it, n);
 
   /* We failed if we find ZV is already on the screen (scrolling up,
      means there's nothing past the end), or if we can't start any
@@ -4983,7 +4983,7 @@
          while (it.current_y < this_scroll_margin)
            {
              int prev = it.current_y;
-             move_it_by_lines (&it, 1, 1);
+             move_it_by_lines (&it, 1);
              if (prev == it.current_y)
                break;
            }
@@ -5017,7 +5017,7 @@
        partial_p = it.current_y + it.ascent + it.descent > it.last_visible_y;
       else
        {
-         move_it_by_lines (&it, 1, 1);
+         move_it_by_lines (&it, 1);
          partial_p = it.current_y > it.last_visible_y;
        }
 
@@ -5044,7 +5044,7 @@
            /* The last line was only partially visible, so back up two
               lines to make sure we're on a fully visible line.  */
            {
-             move_it_by_lines (&it, -2, 0);
+             move_it_by_lines (&it, -2);
              SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it));
            }
          else
@@ -5587,14 +5587,14 @@
          start_display (&it, w, pt);
 
          /* Be sure we have the exact height of the full line containing PT.  
*/
-         move_it_by_lines (&it, 0, 1);
+         move_it_by_lines (&it, 0);
 
          /* The amount of pixels we have to move back is the window
             height minus what's displayed in the line containing PT,
             and the lines below.  */
          it.current_y = 0;
          it.vpos = 0;
-         move_it_by_lines (&it, nlines, 1);
+         move_it_by_lines (&it, nlines);
 
          if (it.vpos == nlines)
            h -= it.current_y;
@@ -5633,7 +5633,7 @@
          */
          h += extra_line_spacing;
          while (-it.current_y > h)
-           move_it_by_lines (&it, 1, 1);
+           move_it_by_lines (&it, 1);
 
          charpos = IT_CHARPOS (it);
          bytepos = IT_BYTEPOS (it);

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2011-03-29 23:35:49 +0000
+++ b/src/xdisp.c       2011-03-31 01:37:51 +0000
@@ -802,13 +802,12 @@
 static int try_scrolling (Lisp_Object, int, EMACS_INT, EMACS_INT, int, int);
 static int try_cursor_movement (Lisp_Object, struct text_pos, int *);
 static int trailing_whitespace_p (EMACS_INT);
-static unsigned long int message_log_check_duplicate (EMACS_INT, EMACS_INT,
-                                                     EMACS_INT, EMACS_INT);
+static unsigned long int message_log_check_duplicate (EMACS_INT, EMACS_INT);
 static void push_it (struct it *);
 static void pop_it (struct it *);
 static void sync_frame_with_window_matrix_rows (struct window *);
 static void select_frame_for_redisplay (Lisp_Object);
-static void redisplay_internal (int);
+static void redisplay_internal ();
 static int echo_area_display (int);
 static void redisplay_windows (Lisp_Object);
 static void redisplay_window (Lisp_Object, int);
@@ -1146,7 +1145,7 @@
        line_height = last_height;
       else if (IT_CHARPOS (*it) < ZV)
        {
-         move_it_by_lines (it, 1, 1);
+         move_it_by_lines (it, 1);
          line_height = (it->max_ascent || it->max_descent
                         ? it->max_ascent + it->max_descent
                         : last_height);
@@ -1270,7 +1269,7 @@
 
       it2 = it;
       if (IT_CHARPOS (it) < ZV && FETCH_BYTE (IT_BYTEPOS (it)) != '\n')
-       move_it_by_lines (&it, 1, 0);
+       move_it_by_lines (&it, 1);
       if (charpos < IT_CHARPOS (it)
          || (it.what == IT_EOB && charpos == IT_CHARPOS (it)))
        {
@@ -7638,7 +7637,7 @@
       /* DY == 0 means move to the start of the screen line.  The
         value of nlines is > 0 if continuation lines were involved.  */
       if (nlines > 0)
-       move_it_by_lines (it, nlines, 1);
+       move_it_by_lines (it, nlines);
     }
   else
     {
@@ -7682,7 +7681,7 @@
            {
              do
                {
-                 move_it_by_lines (it, 1, 1);
+                 move_it_by_lines (it, 1);
                }
              while (target_y >= line_bottom_y (it) && IT_CHARPOS (*it) < ZV);
            }
@@ -7712,7 +7711,7 @@
       if (IT_CHARPOS (*it) == ZV
          && ZV > BEGV
          && FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n')
-       move_it_by_lines (it, 0, 0);
+       move_it_by_lines (it, 0);
     }
 }
 
@@ -7732,15 +7731,14 @@
 
 /* Move IT by a specified number DVPOS of screen lines down.  DVPOS
    negative means move up.  DVPOS == 0 means move to the start of the
-   screen line.  NEED_Y_P non-zero means calculate IT->current_y.  If
-   NEED_Y_P is zero, IT->current_y will be left unchanged.
+   screen line.
 
-   Further optimization ideas: If we would know that IT->f doesn't use
+   Optimization idea: If we would know that IT->f doesn't use
    a face with proportional font, we could be faster for
    truncate-lines nil.  */
 
 void
-move_it_by_lines (struct it *it, int dvpos, int need_y_p)
+move_it_by_lines (struct it *it, int dvpos)
 {
 
   /* The commented-out optimization uses vmotion on terminals.  This
@@ -8003,8 +8001,8 @@
              prev_bol = PT;
              prev_bol_byte = PT_BYTE;
 
-             dups = message_log_check_duplicate (prev_bol, prev_bol_byte,
-                                                 this_bol, this_bol_byte);
+             dups = message_log_check_duplicate (prev_bol_byte,
+                                                  this_bol_byte);
              if (dups)
                {
                  del_range_both (prev_bol, prev_bol_byte,
@@ -8079,8 +8077,7 @@
    value N > 1 if we should also append " [N times]".  */
 
 static unsigned long int
-message_log_check_duplicate (EMACS_INT prev_bol, EMACS_INT prev_bol_byte,
-                            EMACS_INT this_bol, EMACS_INT this_bol_byte)
+message_log_check_duplicate (EMACS_INT prev_bol_byte, EMACS_INT this_bol_byte)
 {
   EMACS_INT i;
   EMACS_INT len = Z_BYTE - 1 - this_bol_byte;
@@ -8838,7 +8835,7 @@
        {
          ++windows_or_buffers_changed;
          ++update_mode_lines;
-         redisplay_internal (0);
+         redisplay_internal ();
        }
     }
 }
@@ -9379,7 +9376,7 @@
              int count = SPECPDL_INDEX ();
              specbind (Qredisplay_dont_pause, Qt);
              windows_or_buffers_changed = 1;
-             redisplay_internal (0);
+             redisplay_internal ();
              unbind_to (count, Qnil);
            }
          else if (FRAME_WINDOW_P (f) && n == 0)
@@ -11150,7 +11147,7 @@
 void
 redisplay (void)
 {
-  redisplay_internal (0);
+  redisplay_internal ();
 }
 
 
@@ -11414,14 +11411,11 @@
        polling_stopped_here = 0; } while (0)
 
 
-/* If PRESERVE_ECHO_AREA is nonzero, it means this redisplay is not in
-   response to any user action; therefore, we should preserve the echo
-   area.  (Actually, our caller does that job.)  Perhaps in the future
-   avoid recentering windows if it is not necessary; currently that
-   causes some problems.  */
+/* Perhaps in the future avoid recentering windows if it
+   is not necessary; currently that causes some problems.  */
 
 static void
-redisplay_internal (int preserve_echo_area)
+redisplay_internal ()
 {
   struct window *w = XWINDOW (selected_window);
   struct window *sw;
@@ -12181,11 +12175,11 @@
       /* We have a previously displayed message, but no current
         message.  Redisplay the previous message.  */
       display_last_displayed_message_p = 1;
-      redisplay_internal (1);
+      redisplay_internal ();
       display_last_displayed_message_p = 0;
     }
   else
-    redisplay_internal (1);
+    redisplay_internal ();
 
   if (FRAME_RIF (SELECTED_FRAME ()) != NULL
       && FRAME_RIF (SELECTED_FRAME ())->flush_display_optional)
@@ -13139,14 +13133,14 @@
          int start_y = line_bottom_y (&it1);
 
          do {
-           move_it_by_lines (&it, 1, 1);
+           move_it_by_lines (&it, 1);
            it1 = it;
          } while (line_bottom_y (&it1) - start_y < amount_to_scroll);
        }
 
       /* If STARTP is unchanged, move it down another screen line.  */
       if (CHARPOS (it.current.pos) == CHARPOS (startp))
-       move_it_by_lines (&it, 1, 1);
+       move_it_by_lines (&it, 1);
       startp = it.current.pos;
     }
   else
@@ -13307,7 +13301,7 @@
            {
              min_distance = distance;
              pos = it.current.pos;
-             move_it_by_lines (&it, 1, 0);
+             move_it_by_lines (&it, 1);
            }
 
          /* Set the window start there.  */
@@ -14269,13 +14263,13 @@
          && PT >= Z - XFASTINT (w->window_end_pos))
        {
          clear_glyph_matrix (w->desired_matrix);
-         move_it_by_lines (&it, 1, 0);
+         move_it_by_lines (&it, 1);
          try_window (window, it.current.pos, 0);
        }
       else if (PT < IT_CHARPOS (it))
        {
          clear_glyph_matrix (w->desired_matrix);
-         move_it_by_lines (&it, -1, 0);
+         move_it_by_lines (&it, -1);
          try_window (window, it.current.pos, 0);
        }
       else


reply via email to

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