]> code.delx.au - gnu-emacs/blobdiff - src/chartab.c
Merge from trunk.
[gnu-emacs] / src / chartab.c
index 0cabaac4cf5569e1d3cb2759277c2ab5acf140fa..e125296261241546c1b82eb04b0581776bfe1c0d 100644 (file)
@@ -107,9 +107,9 @@ the char-table has no extra slot.  */)
   else
     {
       CHECK_NATNUM (n);
-      n_extras = XINT (n);
-      if (n_extras > 10)
+      if (XINT (n) > 10)
        args_out_of_range (n, Qnil);
+      n_extras = XINT (n);
     }
 
   size = VECSIZE (struct Lisp_Char_Table) - 1 + n_extras;
@@ -589,8 +589,6 @@ DEFUN ("set-char-table-extra-slot", Fset_char_table_extra_slot,
   (Lisp_Object char_table, Lisp_Object n, Lisp_Object value)
 {
   CHECK_CHAR_TABLE (char_table);
-  if (EQ (XCHAR_TABLE (char_table)->purpose, Qchar_code_property_table))
-    error ("Can't change extra-slot of char-code-property-table");
   CHECK_NUMBER (n);
   if (XINT (n) < 0
       || XINT (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table)))
@@ -648,7 +646,7 @@ or a character code.  Return VALUE.  */)
     }
   else if (EQ (range, Qnil))
     XCHAR_TABLE (char_table)->defalt = value;
-  else if (INTEGERP (range))
+  else if (CHARACTERP (range))
     char_table_set (char_table, XINT (range), value);
   else if (CONSP (range))
     {
@@ -749,7 +747,7 @@ equivalent and can be merged.  It defaults to `equal'.  */)
    ARG is passed to C_FUNCTION when that is called.
 
    It returns the value of last character covered by TABLE (not the
-   value inheritted from the parent), and by side-effect, the car part
+   value inherited from the parent), and by side-effect, the car part
    of RANGE is updated to the minimum character C where C and all the
    following characters in TABLE have the same value.  */
 
@@ -760,7 +758,7 @@ map_sub_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object),
 {
   /* Depth of TABLE.  */
   int depth;
-  /* Minimum and maxinum characters covered by TABLE. */
+  /* Minimum and maximum characters covered by TABLE. */
   int min_char, max_char;
   /* Number of characters covered by one element of TABLE.  */
   int chars_in_block;
@@ -1198,7 +1196,7 @@ uniprop_table_uncompress (Lisp_Object table, int idx)
 }
 
 
-/* Decode VALUE as an elemnet of char-table TABLE.  */
+/* Decode VALUE as an element of char-table TABLE.  */
 
 static Lisp_Object
 uniprop_decode_value_run_length (Lisp_Object table, Lisp_Object value)
@@ -1225,7 +1223,7 @@ static int uniprop_decoder_count
 static uniprop_decoder_t
 uniprop_get_decoder (Lisp_Object table)
 {
-  int i;
+  EMACS_INT i;
 
   if (! INTEGERP (XCHAR_TABLE (table)->extras[1]))
     return NULL;
@@ -1305,7 +1303,7 @@ static int uniprop_encoder_count
 static uniprop_decoder_t
 uniprop_get_encoder (Lisp_Object table)
 {
-  int i;
+  EMACS_INT i;
 
   if (! INTEGERP (XCHAR_TABLE (table)->extras[2]))
     return NULL;