]> git.eshelyaron.com Git - emacs.git/commitdiff
* insdel.c: Make symbols static if they're not exported.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 14 Apr 2011 00:44:47 +0000 (17:44 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 14 Apr 2011 00:44:47 +0000 (17:44 -0700)
However, leave prepare_to_modify_buffer alone.  It's never
called from outside this function, but that appears to be a bug.
(combine_after_change_list, combine_after_change_buffer):
(adjust_after_replace): Now static.
(adjust_after_replace_noundo): Remove; unused.
* lisp.h (adjust_after_replace, adjust_after_replace_noundo):
Remove decls.

src/ChangeLog
src/insdel.c
src/lisp.h

index c11fd18714e3d68f8682ace0238addf69699ad8e..c87dfb5056e63fb602a725b14be6f0bfd4a8acf2 100644 (file)
@@ -1,5 +1,14 @@
 2011-04-13  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * insdel.c: Make symbols static if they're not exported.
+       However, leave prepare_to_modify_buffer alone.  It's never
+       called from outside this function, but that appears to be a bug.
+       (combine_after_change_list, combine_after_change_buffer):
+       (adjust_after_replace): Now static.
+       (adjust_after_replace_noundo): Remove; unused.
+       * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
+       Remove decls.
+
        * indent.c (val_compute_motion, val_vmotion): Now static.
 
        * image.c: Make symbols static if they're not exported.
index dd7e3c14335eaa91996e4b10d60337ce19133b1c..4bc25025a2f5172fac8c784ffd26ae5930b64f12 100644 (file)
@@ -60,10 +60,10 @@ INFUN (Fcombine_after_change_execute, 0);
    END-UNCHANGED is the number of chars after the changed range,
    and CHANGE-AMOUNT is the number of characters inserted by the change
    (negative for a deletion).  */
-Lisp_Object combine_after_change_list;
+static Lisp_Object combine_after_change_list;
 
 /* Buffer which combine_after_change_list is about.  */
-Lisp_Object combine_after_change_buffer;
+static Lisp_Object combine_after_change_buffer;
 
 Lisp_Object Qinhibit_modification_hooks;
 \f
@@ -1222,7 +1222,7 @@ insert_from_buffer_1 (struct buffer *buf,
 
    PREV_TEXT nil means the new text was just inserted.  */
 
-void
+static void
 adjust_after_replace (EMACS_INT from, EMACS_INT from_byte,
                      Lisp_Object prev_text, EMACS_INT len, EMACS_INT len_byte)
 {
@@ -1285,58 +1285,6 @@ adjust_after_replace (EMACS_INT from, EMACS_INT from_byte,
   CHARS_MODIFF = MODIFF;
 }
 
-/* Like adjust_after_replace, but doesn't require PREV_TEXT.
-   This is for use when undo is not enabled in the current buffer.  */
-
-void
-adjust_after_replace_noundo (EMACS_INT from, EMACS_INT from_byte,
-                            EMACS_INT nchars_del, EMACS_INT nbytes_del,
-                            EMACS_INT len, EMACS_INT len_byte)
-{
-#ifdef BYTE_COMBINING_DEBUG
-  if (count_combining_before (GPT_ADDR, len_byte, from, from_byte)
-      || count_combining_after (GPT_ADDR, len_byte, from, from_byte))
-    abort ();
-#endif
-
-  /* Update various buffer positions for the new text.  */
-  GAP_SIZE -= len_byte;
-  ZV += len; Z+= len;
-  ZV_BYTE += len_byte; Z_BYTE += len_byte;
-  GPT += len; GPT_BYTE += len_byte;
-  if (GAP_SIZE > 0) *(GPT_ADDR) = 0; /* Put an anchor. */
-
-  if (nchars_del > 0)
-    adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del,
-                               len, len_byte);
-  else
-    adjust_markers_for_insert (from, from_byte,
-                              from + len, from_byte + len_byte, 0);
-
-  if (len > nchars_del)
-    adjust_overlays_for_insert (from, len - nchars_del);
-  else if (len < nchars_del)
-    adjust_overlays_for_delete (from, nchars_del - len);
-  if (BUF_INTERVALS (current_buffer) != 0)
-    {
-      offset_intervals (current_buffer, from, len - nchars_del);
-    }
-
-  if (from < PT)
-    adjust_point (len - nchars_del, len_byte - nbytes_del);
-
-  /* As byte combining will decrease Z, we must check this again. */
-  if (Z - GPT < END_UNCHANGED)
-    END_UNCHANGED = Z - GPT;
-
-  CHECK_MARKERS ();
-
-  if (len == 0)
-    evaporate_overlays (from);
-  MODIFF++;
-  CHARS_MODIFF = MODIFF;
-}
-
 /* Record undo information, adjust markers and position keepers for an
    insertion of a text from FROM (FROM_BYTE) to TO (TO_BYTE).  The
    text already exists in the current buffer but character length (TO
index 4f2540022963b96113779fe1bc8b150d706f1ba8..e25ae89dfaad5310d9a41f7ba83eea4e2441d53a 100644 (file)
@@ -2570,10 +2570,6 @@ extern void modify_region (struct buffer *, EMACS_INT, EMACS_INT, int);
 extern void prepare_to_modify_buffer (EMACS_INT, EMACS_INT, EMACS_INT *);
 extern void signal_before_change (EMACS_INT, EMACS_INT, EMACS_INT *);
 extern void signal_after_change (EMACS_INT, EMACS_INT, EMACS_INT);
-extern void adjust_after_replace (EMACS_INT, EMACS_INT, Lisp_Object,
-                                 EMACS_INT, EMACS_INT);
-extern void adjust_after_replace_noundo (EMACS_INT, EMACS_INT, EMACS_INT,
-                                        EMACS_INT, EMACS_INT, EMACS_INT);
 extern void adjust_after_insert (EMACS_INT, EMACS_INT, EMACS_INT,
                                 EMACS_INT, EMACS_INT);
 extern void adjust_markers_for_delete (EMACS_INT, EMACS_INT,