emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r109663: * lisp.h (set_char_table_ext


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109663: * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
Date: Fri, 17 Aug 2012 10:08:30 -0700
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109663
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Fri 2012-08-17 10:08:30 -0700
message:
  * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
  
  (set_char_table_contents): Rename from char_table_set_contents.
  (set_sub_char_table_contents): Rename from sub_char_table_sub_contents.
  All uses changed.  See the end of
  <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
modified:
  src/ChangeLog
  src/casetab.c
  src/category.c
  src/chartab.c
  src/fns.c
  src/fontset.c
  src/lisp.h
  src/search.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-08-17 16:53:03 +0000
+++ b/src/ChangeLog     2012-08-17 17:08:30 +0000
@@ -1,5 +1,11 @@
 2012-08-17  Paul Eggert  <address@hidden>
 
+       * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
+       (set_char_table_contents): Rename from char_table_set_contents.
+       (set_sub_char_table_contents): Rename from sub_char_table_sub_contents.
+       All uses changed.  See the end of
+       <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
+
        * lisp.h (CSET): Remove (Bug#12215).
        (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
        (set_char_table_purpose): New functions,

=== modified file 'src/casetab.c'
--- a/src/casetab.c     2012-08-17 16:48:22 +0000
+++ b/src/casetab.c     2012-08-17 17:08:30 +0000
@@ -128,13 +128,13 @@
       up = Fmake_char_table (Qcase_table, Qnil);
       map_char_table (set_identity, Qnil, table, up);
       map_char_table (shuffle, Qnil, table, up);
-      char_table_set_extras (table, 0, up);
+      set_char_table_extras (table, 0, up);
     }
 
   if (NILP (canon))
     {
       canon = Fmake_char_table (Qcase_table, Qnil);
-      char_table_set_extras (table, 1, canon);
+      set_char_table_extras (table, 1, canon);
       map_char_table (set_canon, Qnil, table, table);
     }
 
@@ -143,11 +143,11 @@
       eqv = Fmake_char_table (Qcase_table, Qnil);
       map_char_table (set_identity, Qnil, canon, eqv);
       map_char_table (shuffle, Qnil, canon, eqv);
-      char_table_set_extras (table, 2, eqv);
+      set_char_table_extras (table, 2, eqv);
     }
 
   /* This is so set_image_of_range_1 in regex.c can find the EQV table.  */
-  char_table_set_extras (canon, 2, eqv);
+  set_char_table_extras (canon, 2, eqv);
 
   if (standard)
     {
@@ -268,10 +268,10 @@
       CHAR_TABLE_SET (down, i, make_number (c));
     }
 
-  char_table_set_extras (down, 1, Fcopy_sequence (down));
+  set_char_table_extras (down, 1, Fcopy_sequence (down));
 
   up = Fmake_char_table (Qcase_table, Qnil);
-  char_table_set_extras (down, 0, up);
+  set_char_table_extras (down, 0, up);
 
   for (i = 0; i < 128; i++)
     {
@@ -281,7 +281,7 @@
       CHAR_TABLE_SET (up, i, make_number (c));
     }
 
-  char_table_set_extras (down, 2, Fcopy_sequence (up));
+  set_char_table_extras (down, 2, Fcopy_sequence (up));
 
   /* Fill in what isn't filled in.  */
   set_case_table (down, 1);

=== modified file 'src/category.c'
--- a/src/category.c    2012-08-17 16:48:22 +0000
+++ b/src/category.c    2012-08-17 17:08:30 +0000
@@ -70,7 +70,7 @@
   EMACS_UINT hash;
 
   if (NILP (XCHAR_TABLE (table)->extras[1]))
-    char_table_set_extras
+    set_char_table_extras
       (table, 1,
        make_hash_table (Qequal, make_number (DEFAULT_HASH_SIZE),
                        make_float (DEFAULT_REHASH_SIZE),
@@ -240,7 +240,7 @@
   if (! NILP (XCHAR_TABLE (table)->defalt))
     set_char_table_defalt (table,
                           Fcopy_sequence (XCHAR_TABLE (table)->defalt));
-  char_table_set_extras
+  set_char_table_extras
     (table, 0, Fcopy_sequence (XCHAR_TABLE (table)->extras[0]));
   map_char_table (copy_category_entry, Qnil, table, table);
 
@@ -272,7 +272,7 @@
   val = Fmake_char_table (Qcategory_table, Qnil);
   set_char_table_defalt (val, MAKE_CATEGORY_SET);
   for (i = 0; i < (1 << CHARTAB_SIZE_BITS_0); i++)
-    char_table_set_contents (val, i, MAKE_CATEGORY_SET);
+    set_char_table_contents (val, i, MAKE_CATEGORY_SET);
   Fset_char_table_extra_slot (val, make_number (0),
                              Fmake_vector (make_number (95), Qnil));
   return val;

=== modified file 'src/chartab.c'
--- a/src/chartab.c     2012-08-17 16:48:22 +0000
+++ b/src/chartab.c     2012-08-17 17:08:30 +0000
@@ -155,21 +155,17 @@
 static Lisp_Object
 copy_sub_char_table (Lisp_Object table)
 {
-  Lisp_Object copy;
   int depth = XINT (XSUB_CHAR_TABLE (table)->depth);
   int min_char = XINT (XSUB_CHAR_TABLE (table)->min_char);
-  Lisp_Object val;
+  Lisp_Object copy = make_sub_char_table (depth, min_char, Qnil);
   int i;
 
-  copy = make_sub_char_table (depth, min_char, Qnil);
   /* Recursively copy any sub char-tables.  */
   for (i = 0; i < chartab_size[depth]; i++)
     {
-      val = XSUB_CHAR_TABLE (table)->contents[i];
-      if (SUB_CHAR_TABLE_P (val))
-       sub_char_table_set_contents (copy, i, copy_sub_char_table (val));
-      else
-       sub_char_table_set_contents (copy, i, val);
+      Lisp_Object val = XSUB_CHAR_TABLE (table)->contents[i];
+      set_sub_char_table_contents
+       (copy, i, SUB_CHAR_TABLE_P (val) ? copy_sub_char_table (val) : val);
     }
 
   return copy;
@@ -189,7 +185,7 @@
   set_char_table_parent (copy, XCHAR_TABLE (table)->parent);
   set_char_table_purpose (copy, XCHAR_TABLE (table)->purpose);
   for (i = 0; i < chartab_size[0]; i++)
-    char_table_set_contents
+    set_char_table_contents
       (copy, i,
        (SUB_CHAR_TABLE_P (XCHAR_TABLE (table)->contents[i])
        ? copy_sub_char_table (XCHAR_TABLE (table)->contents[i])
@@ -197,7 +193,7 @@
   set_char_table_ascii (copy, char_table_ascii (copy));
   size -= VECSIZE (struct Lisp_Char_Table) - 1;
   for (i = 0; i < size; i++)
-    char_table_set_extras (copy, i, XCHAR_TABLE (table)->extras[i]);
+    set_char_table_extras (copy, i, XCHAR_TABLE (table)->extras[i]);
 
   XSETCHAR_TABLE (copy, XCHAR_TABLE (copy));
   return copy;
@@ -395,7 +391,7 @@
   Lisp_Object sub;
 
   if (depth == 3)
-    sub_char_table_set_contents (table, i, val);
+    set_sub_char_table_contents (table, i, val);
   else
     {
       sub = tbl->contents[i];
@@ -408,7 +404,7 @@
              sub = make_sub_char_table (depth + 1,
                                         min_char + i * chartab_chars[depth],
                                         sub);
-             sub_char_table_set_contents (table, i, sub);
+             set_sub_char_table_contents (table, i, sub);
            }
        }
       sub_char_table_set (sub, c, val, is_uniprop);
@@ -422,7 +418,7 @@
 
   if (ASCII_CHAR_P (c)
       && SUB_CHAR_TABLE_P (tbl->ascii))
-    sub_char_table_set_contents (tbl->ascii, c, val);
+    set_sub_char_table_contents (tbl->ascii, c, val);
   else
     {
       int i = CHARTAB_IDX (c, 0, 0);
@@ -432,7 +428,7 @@
       if (! SUB_CHAR_TABLE_P (sub))
        {
          sub = make_sub_char_table (1, i * chartab_chars[0], sub);
-         char_table_set_contents (table, i, sub);
+         set_char_table_contents (table, i, sub);
        }
       sub_char_table_set (sub, c, val, UNIPROP_TABLE_P (table));
       if (ASCII_CHAR_P (c))
@@ -460,7 +456,7 @@
       if (c > to)
        break;
       if (from <= c && c + chars_in_block - 1 <= to)
-       sub_char_table_set_contents (table, i, val);
+       set_sub_char_table_contents (table, i, val);
       else
        {
          Lisp_Object sub = tbl->contents[i];
@@ -471,7 +467,7 @@
              else
                {
                  sub = make_sub_char_table (depth + 1, c, sub);
-                 sub_char_table_set_contents (table, i, sub);
+                 set_sub_char_table_contents (table, i, sub);
                }
            }
          sub_char_table_set_range (sub, from, to, val, is_uniprop);
@@ -499,14 +495,14 @@
          if (c > to)
            break;
          if (from <= c && c + chartab_chars[0] - 1 <= to)
-           char_table_set_contents (table, i, val);
+           set_char_table_contents (table, i, val);
          else
            {
              Lisp_Object sub = tbl->contents[i];
              if (! SUB_CHAR_TABLE_P (sub))
                {
                  sub = make_sub_char_table (1, i * chartab_chars[0], sub);
-                 char_table_set_contents (table, i, sub);
+                 set_char_table_contents (table, i, sub);
                }
              sub_char_table_set_range (sub, from, to, val, is_uniprop);
            }
@@ -593,7 +589,7 @@
       || XINT (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table)))
     args_out_of_range (char_table, n);
 
-  char_table_set_extras (char_table, XINT (n), value);
+  set_char_table_extras (char_table, XINT (n), value);
   return value;
 }
 
@@ -642,7 +638,7 @@
 
       set_char_table_ascii (char_table, value);
       for (i = 0; i < chartab_size[0]; i++)
-       char_table_set_contents (char_table, i, value);
+       set_char_table_contents (char_table, i, value);
     }
   else if (EQ (range, Qnil))
     set_char_table_defalt (char_table, value);
@@ -695,7 +691,7 @@
   if (SUB_CHAR_TABLE_P (elt))
     {
       elt = optimize_sub_char_table (elt, test);
-      sub_char_table_set_contents (table, 0, elt);
+      set_sub_char_table_contents (table, 0, elt);
     }
   optimizable = SUB_CHAR_TABLE_P (elt) ? 0 : 1;
   for (i = 1; i < chartab_size[depth]; i++)
@@ -704,7 +700,7 @@
       if (SUB_CHAR_TABLE_P (this))
        {
          this = optimize_sub_char_table (this, test);
-         sub_char_table_set_contents (table, i, this);
+         set_sub_char_table_contents (table, i, this);
        }
       if (optimizable
          && (NILP (test) ? NILP (Fequal (this, elt)) /* defaults to `equal'. */
@@ -732,7 +728,7 @@
     {
       elt = XCHAR_TABLE (char_table)->contents[i];
       if (SUB_CHAR_TABLE_P (elt))
-       char_table_set_contents
+       set_char_table_contents
          (char_table, i, optimize_sub_char_table (elt, test));
     }
   /* Reset the `ascii' cache, in case it got optimized away.  */
@@ -1149,7 +1145,7 @@
   Lisp_Object sub = make_sub_char_table (3, min_char, Qnil);
   const unsigned char *p, *pend;
 
-  sub_char_table_set_contents (table, idx, sub);
+  set_sub_char_table_contents (table, idx, sub);
   p = SDATA (val), pend = p + SBYTES (val);
   if (*p == 1)
     {
@@ -1159,7 +1155,7 @@
       while (p < pend && idx < chartab_chars[2])
        {
          int v = STRING_CHAR_ADVANCE (p);
-         sub_char_table_set_contents
+         set_sub_char_table_contents
            (sub, idx++, v > 0 ? make_number (v) : Qnil);
        }
     }
@@ -1185,7 +1181,7 @@
                }
            }
          while (count-- > 0)
-           sub_char_table_set_contents (sub, idx++, make_number (v));
+           set_sub_char_table_contents (sub, idx++, make_number (v));
        }
     }
 /* It seems that we don't need this function because C code won't need
@@ -1288,7 +1284,7 @@
 
       args[0] = XCHAR_TABLE (table)->extras[4];
       args[1] = Fmake_vector (make_number (1), value);
-      char_table_set_extras (table, 4, Fvconcat (2, args));
+      set_char_table_extras (table, 4, Fvconcat (2, args));
     }
   return make_number (i);
 }

=== modified file 'src/fns.c'
--- a/src/fns.c 2012-08-17 16:48:22 +0000
+++ b/src/fns.c 2012-08-17 17:08:30 +0000
@@ -2150,7 +2150,7 @@
       int i;
 
       for (i = 0; i < (1 << CHARTAB_SIZE_BITS_0); i++)
-       char_table_set_contents (array, i, item);
+       set_char_table_contents (array, i, item);
       set_char_table_defalt (array, item);
     }
   else if (STRINGP (array))

=== modified file 'src/fontset.c'
--- a/src/fontset.c     2012-08-17 16:48:22 +0000
+++ b/src/fontset.c     2012-08-17 17:08:30 +0000
@@ -1916,7 +1916,7 @@
   if (!EQ (fontset, Vdefault_fontset))
     {
       tables[1] = Fmake_char_table (Qnil, Qnil);
-      char_table_set_extras (tables[0], 0, tables[1]);
+      set_char_table_extras (tables[0], 0, tables[1]);
       fontsets[1] = Vdefault_fontset;
     }
 

=== modified file 'src/lisp.h'
--- a/src/lisp.h        2012-08-17 16:48:22 +0000
+++ b/src/lisp.h        2012-08-17 17:08:30 +0000
@@ -923,7 +923,7 @@
    8-bit European characters.  Do not check validity of CT.  */
 #define CHAR_TABLE_SET(CT, IDX, VAL)                                   \
   (ASCII_CHAR_P (IDX) && SUB_CHAR_TABLE_P (XCHAR_TABLE (CT)->ascii)    \
-   ? sub_char_table_set_contents (XCHAR_TABLE (CT)->ascii, IDX, VAL)   \
+   ? set_sub_char_table_contents (XCHAR_TABLE (CT)->ascii, IDX, VAL)   \
    : char_table_set (CT, IDX, VAL))
 
 enum CHARTAB_SIZE_BITS
@@ -984,7 +984,7 @@
     /* Minimum character covered by the sub char-table.  */
     Lisp_Object min_char;
 
-    /* Use sub_char_table_set_contents to set this.  */
+    /* Use set_sub_char_table_contents to set this.  */
     Lisp_Object contents[1];
   };
 
@@ -2498,21 +2498,21 @@
 /* Set different slots in (sub)character tables.  */
 
 LISP_INLINE void
-char_table_set_extras (Lisp_Object table, ptrdiff_t idx, Lisp_Object val)
+set_char_table_extras (Lisp_Object table, ptrdiff_t idx, Lisp_Object val)
 {
   eassert (0 <= idx && idx < CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (table)));
   XCHAR_TABLE (table)->extras[idx] = val;
 }
 
 LISP_INLINE void
-char_table_set_contents (Lisp_Object table, ptrdiff_t idx, Lisp_Object val)
+set_char_table_contents (Lisp_Object table, ptrdiff_t idx, Lisp_Object val)
 {
   eassert (0 <= idx && idx < (1 << CHARTAB_SIZE_BITS_0));
   XCHAR_TABLE (table)->contents[idx] = val;
 }
 
 LISP_INLINE void
-sub_char_table_set_contents (Lisp_Object table, ptrdiff_t idx, Lisp_Object val)
+set_sub_char_table_contents (Lisp_Object table, ptrdiff_t idx, Lisp_Object val)
 {
   XSUB_CHAR_TABLE (table)->contents[idx] = val;
 }

=== modified file 'src/search.c'
--- a/src/search.c      2012-08-16 03:13:44 +0000
+++ b/src/search.c      2012-08-17 17:08:30 +0000
@@ -278,7 +278,7 @@
     save_search_regs ();
 
   /* This is so set_image_of_range_1 in regex.c can find the EQV table.  */
-  char_table_set_extras (BVAR (current_buffer, case_canon_table), 2,
+  set_char_table_extras (BVAR (current_buffer, case_canon_table), 2,
                         BVAR (current_buffer, case_eqv_table));
 
   CHECK_STRING (string);
@@ -393,7 +393,7 @@
     }
 
   /* This is so set_image_of_range_1 in regex.c can find the EQV table.  */
-  char_table_set_extras (BVAR (current_buffer, case_canon_table), 2,
+  set_char_table_extras (BVAR (current_buffer, case_canon_table), 2,
                         BVAR (current_buffer, case_eqv_table));
 
   bufp = compile_pattern (regexp,
@@ -990,7 +990,7 @@
     }
 
   /* This is so set_image_of_range_1 in regex.c can find the EQV table.  */
-  char_table_set_extras (BVAR (current_buffer, case_canon_table), 2,
+  set_char_table_extras (BVAR (current_buffer, case_canon_table), 2,
                         BVAR (current_buffer, case_eqv_table));
 
   np = search_buffer (string, PT, PT_BYTE, lim, lim_byte, n, RE,


reply via email to

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