emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r103754: src/*.h: Remove unused param


From: Juanma Barranquero
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103754: src/*.h: Remove unused parameters and functions.
Date: Sat, 26 Mar 2011 02:23:15 +0100
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103754
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Sat 2011-03-26 02:23:15 +0100
message:
  src/*.h: Remove unused parameters and functions.
  
  * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
  
  * keyboard.c (timer_check): Remove parameter `do_it_now',
    unused since revno:14998 (1996-04-12).
    (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
    unused since revno:86854 (2008-04-19).
  
  * keyboard.c (read_char):
  * w32menu.c (w32_menu_display_help):
  * xmenu.c (show_help_event, menu_help_callback):
    Adjust calls to `show_help_echo'.
  
  * gtkutil.c (xg_maybe_add_timer):
  * keyboard.c (readable_events):
  * process.c (wait_reading_process_output):
  * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
  
  * insdel.c (adjust_markers_gap_motion):
    Remove; no-op since revno:20569 (1998-01-02).
    (gap_left, gap_right): Don't call it.
modified:
  src/ChangeLog
  src/gtkutil.c
  src/insdel.c
  src/keyboard.c
  src/keyboard.h
  src/process.c
  src/w32menu.c
  src/xmenu.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-03-25 20:00:25 +0000
+++ b/src/ChangeLog     2011-03-26 01:23:15 +0000
@@ -1,3 +1,26 @@
+2011-03-26  Juanma Barranquero  <address@hidden>
+
+       * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
+
+       * keyboard.c (timer_check): Remove parameter `do_it_now',
+       unused since revno:14998 (1996-04-12).
+       (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
+       unused since revno:86854 (2008-04-19).
+
+       * keyboard.c (read_char):
+       * w32menu.c (w32_menu_display_help):
+       * xmenu.c (show_help_event, menu_help_callback):
+       Adjust calls to `show_help_echo'.
+
+       * gtkutil.c (xg_maybe_add_timer):
+       * keyboard.c (readable_events):
+       * process.c (wait_reading_process_output):
+       * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
+
+       * insdel.c (adjust_markers_gap_motion):
+       Remove; no-op since revno:20569 (1998-01-02).
+       (gap_left, gap_right): Don't call it.
+
 2011-03-25  Chong Yidong  <address@hidden>
 
        * xdisp.c (handle_fontified_prop): Discard changes to clip_changed

=== modified file 'src/gtkutil.c'
--- a/src/gtkutil.c     2011-03-13 08:42:12 +0000
+++ b/src/gtkutil.c     2011-03-26 01:23:15 +0000
@@ -1555,7 +1555,7 @@
 xg_maybe_add_timer (gpointer data)
 {
   struct xg_dialog_data *dd = (struct xg_dialog_data *) data;
-  EMACS_TIME next_time = timer_check (1);
+  EMACS_TIME next_time = timer_check ();
   long secs = EMACS_SECS (next_time);
   long usecs = EMACS_USECS (next_time);
 

=== modified file 'src/insdel.c'
--- a/src/insdel.c      2011-03-23 10:06:57 +0000
+++ b/src/insdel.c      2011-03-26 01:23:15 +0000
@@ -41,8 +41,6 @@
                                  int inherit);
 static void gap_left (EMACS_INT charpos, EMACS_INT bytepos, int newgap);
 static void gap_right (EMACS_INT charpos, EMACS_INT bytepos);
-static void adjust_markers_gap_motion (EMACS_INT from, EMACS_INT to,
-                                      EMACS_INT amount);
 static void adjust_markers_for_insert (EMACS_INT from, EMACS_INT from_byte,
                                       EMACS_INT to, EMACS_INT to_byte,
                                       int before_markers);
@@ -162,10 +160,9 @@
       memmove (to, from, i);
     }
 
-  /* Adjust markers, and buffer data structure, to put the gap at BYTEPOS.
-     BYTEPOS is where the loop above stopped, which may be what was specified
-     or may be where a quit was detected.  */
-  adjust_markers_gap_motion (bytepos, GPT_BYTE, GAP_SIZE);
+  /* Adjust buffer data structure, to put the gap at BYTEPOS.
+     BYTEPOS is where the loop above stopped, which may be what
+     was specified or may be where a quit was detected.  */
   GPT_BYTE = bytepos;
   GPT = charpos;
   if (bytepos < charpos)
@@ -217,8 +214,6 @@
       from += i, to += i;
     }
 
-  adjust_markers_gap_motion (GPT_BYTE + GAP_SIZE, bytepos + GAP_SIZE,
-                            - GAP_SIZE);
   GPT = charpos;
   GPT_BYTE = bytepos;
   if (bytepos < charpos)
@@ -227,67 +222,6 @@
   QUIT;
 }
 
-/* Add AMOUNT to the byte position of every marker in the current buffer
-   whose current byte position is between FROM (exclusive) and TO (inclusive).
-
-   Also, any markers past the outside of that interval, in the direction
-   of adjustment, are first moved back to the near end of the interval
-   and then adjusted by AMOUNT.
-
-   When the latter adjustment is done, if AMOUNT is negative,
-   we record the adjustment for undo.  (This case happens only for
-   deletion.)
-
-   The markers' character positions are not altered,
-   because gap motion does not affect character positions.  */
-
-int adjust_markers_test;
-
-static void
-adjust_markers_gap_motion (EMACS_INT from, EMACS_INT to, EMACS_INT amount)
-{
-  /* Now that a marker has a bytepos, not counting the gap,
-     nothing needs to be done here.  */
-#if 0
-  Lisp_Object marker;
-  register struct Lisp_Marker *m;
-  register EMACS_INT mpos;
-
-  marker = BUF_MARKERS (current_buffer);
-
-  while (!NILP (marker))
-    {
-      m = XMARKER (marker);
-      mpos = m->bytepos;
-      if (amount > 0)
-       {
-         if (mpos > to && mpos < to + amount)
-           {
-             if (adjust_markers_test)
-               abort ();
-             mpos = to + amount;
-           }
-       }
-      else
-       {
-         /* Here's the case where a marker is inside text being deleted.
-            AMOUNT can be negative for gap motion, too,
-            but then this range contains no markers.  */
-         if (mpos > from + amount && mpos <= from)
-           {
-             if (adjust_markers_test)
-               abort ();
-             mpos = from + amount;
-           }
-       }
-      if (mpos > from && mpos <= to)
-       mpos += amount;
-      m->bufpos = mpos;
-      marker = m->chain;
-    }
-#endif
-}
-
 /* Adjust all markers for a deletion
    whose range in bytes is FROM_BYTE to TO_BYTE.
    The range in charpos is FROM to TO.

=== modified file 'src/keyboard.c'
--- a/src/keyboard.c    2011-03-25 15:39:59 +0000
+++ b/src/keyboard.c    2011-03-26 01:23:15 +0000
@@ -351,7 +351,7 @@
 Lisp_Object recursive_edit_unwind (Lisp_Object buffer), command_loop (void);
 Lisp_Object Fthis_command_keys (void);
 Lisp_Object Qextended_command_history;
-EMACS_TIME timer_check (int do_it_now);
+EMACS_TIME timer_check (void);
 
 static void record_menu_key (Lisp_Object c);
 static int echo_length (void);
@@ -2068,16 +2068,12 @@
    the `display' property).  POS is the position in that string under
    the mouse.
 
-   OK_TO_OVERWRITE_KEYSTROKE_ECHO non-zero means it's okay if the help
-   echo overwrites a keystroke echo currently displayed in the echo
-   area.
-
    Note: this function may only be called with HELP nil or a string
    from X code running asynchronously.  */
 
 void
 show_help_echo (Lisp_Object help, Lisp_Object window, Lisp_Object object,
-               Lisp_Object pos, int ok_to_overwrite_keystroke_echo)
+               Lisp_Object pos)
 {
   if (!NILP (help) && !STRINGP (help))
     {
@@ -3007,7 +3003,7 @@
       htem = Fcdr (htem);
       position = Fcar (htem);
 
-      show_help_echo (help, window, object, position, 0);
+      show_help_echo (help, window, object, position);
 
       /* We stopped being idle for this event; undo that.  */
       if (!end_time)
@@ -3309,7 +3305,7 @@
 readable_events (int flags)
 {
   if (flags & READABLE_EVENTS_DO_TIMERS_NOW)
-    timer_check (1);
+    timer_check ();
 
   /* If the buffer contains only FOCUS_IN_EVENT events, and
      READABLE_EVENTS_FILTER_EVENTS is set, report it as empty.  */
@@ -4383,14 +4379,10 @@
    Returns the time to wait until the next timer fires.
    If no timer is active, return -1.
 
-   As long as any timer is ripe, we run it.
-
-   DO_IT_NOW is now ignored.  It used to mean that we should
-   run the timer directly instead of queueing a timer-event.
-   Now we always run timers directly.  */
+   As long as any timer is ripe, we run it.  */
 
 EMACS_TIME
-timer_check (int do_it_now)
+timer_check (void)
 {
   EMACS_TIME nexttime;
 

=== modified file 'src/keyboard.h'
--- a/src/keyboard.h    2011-03-17 16:32:03 +0000
+++ b/src/keyboard.h    2011-03-26 01:23:15 +0000
@@ -507,7 +507,7 @@
 extern void kbd_buffer_unget_event (struct input_event *);
 extern void poll_for_input_1 (void);
 extern void show_help_echo (Lisp_Object, Lisp_Object, Lisp_Object,
-                            Lisp_Object, int);
+                            Lisp_Object);
 extern void gen_help_event (Lisp_Object, Lisp_Object, Lisp_Object,
                             Lisp_Object, EMACS_INT);
 extern void kbd_buffer_store_help_event (Lisp_Object, Lisp_Object);
@@ -517,7 +517,7 @@
 
 extern int tty_read_avail_input (struct terminal *, int,
                                  struct input_event *);
-extern EMACS_TIME timer_check (int);
+extern EMACS_TIME timer_check (void);
 extern void mark_kboards (void);
 
 #ifdef WINDOWSNT

=== modified file 'src/process.c'
--- a/src/process.c     2011-03-20 16:55:33 +0000
+++ b/src/process.c     2011-03-26 01:23:15 +0000
@@ -4548,7 +4548,7 @@
              struct buffer *old_buffer = current_buffer;
              Lisp_Object old_window = selected_window;
 
-             timer_delay = timer_check (1);
+             timer_delay = timer_check ();
 
              /* If a timer has run, this might have changed buffers
                 an alike.  Make read_key_sequence aware of that.  */
@@ -6946,7 +6946,7 @@
          do
            {
              int old_timers_run = timers_run;
-             timer_delay = timer_check (1);
+             timer_delay = timer_check ();
              if (timers_run != old_timers_run && do_display)
                /* We must retry, since a timer may have requeued itself
                   and that could alter the time delay.  */

=== modified file 'src/w32menu.c'
--- a/src/w32menu.c     2011-03-23 16:25:38 +0000
+++ b/src/w32menu.c     2011-03-26 01:23:15 +0000
@@ -1616,7 +1616,7 @@
       else
        /* X version has a loop through frames here, which doesn't
           appear to do anything, unless it has some side effect.  */
-       show_help_echo (help, Qnil, Qnil, Qnil, 1);
+       show_help_echo (help, Qnil, Qnil, Qnil);
     }
 }
 

=== modified file 'src/xmenu.c'
--- a/src/xmenu.c       2011-03-22 08:59:50 +0000
+++ b/src/xmenu.c       2011-03-26 01:23:15 +0000
@@ -383,7 +383,7 @@
 #endif
          )
     {
-      EMACS_TIME next_time = timer_check (1), *ntp;
+      EMACS_TIME next_time = timer_check (), *ntp;
       long secs = EMACS_SECS (next_time);
       long usecs = EMACS_USECS (next_time);
       SELECT_TYPE read_fds;
@@ -712,7 +712,7 @@
            break;
        }
 #endif
-      show_help_echo (help, Qnil, Qnil, Qnil, 1);
+      show_help_echo (help, Qnil, Qnil, Qnil);
     }
 }
 
@@ -2201,7 +2201,7 @@
                       Fcons (pane_name,
                              Fcons (make_number (pane), Qnil)));
   show_help_echo (help_string ? build_string (help_string) : Qnil,
-                 Qnil, menu_object, make_number (item), 1);
+                 Qnil, menu_object, make_number (item));
 }
 
 static Lisp_Object


reply via email to

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