* coding.c (Fdefine_coding_system_internal): Use AREF where
authorDmitry Antipov <dmantipov@yandex.ru>
Thu, 7 Feb 2013 16:09:04 +0000 (20:09 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Thu, 7 Feb 2013 16:09:04 +0000 (20:09 +0400)
argument is known to be a vector.
* fns.c (Flocale_info): Likewise for ASET.
* xselect.c (selection_data_to_lisp_data): Likewise for ASET.
* w32fns.c (w32_parse_hot_key): Likewise for ASIZE and AREF.

src/ChangeLog
src/coding.c
src/fns.c
src/w32fns.c
src/xselect.c

index dc0ae08..9ffe133 100644 (file)
@@ -1,3 +1,11 @@
+2013-02-07  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * coding.c (Fdefine_coding_system_internal): Use AREF where
+       argument is known to be a vector.
+       * fns.c (Flocale_info): Likewise for ASET.
+       * xselect.c (selection_data_to_lisp_data): Likewise for ASET.
+       * w32fns.c (w32_parse_hot_key): Likewise for ASIZE and AREF.
+
 2013-02-05  Jan Djärv  <jan.h.d@swipnet.se>
 
        * nsmenu.m (update_frame_tool_bar): Check for negative tool bar
index 93da9db..c7bfe25 100644 (file)
@@ -9783,7 +9783,7 @@ usage: (define-coding-system-internal ...)  */)
       CHECK_VECTOR (initial);
       for (i = 0; i < 4; i++)
        {
-         val = Faref (initial, make_number (i));
+         val = AREF (initial, i);
          if (! NILP (val))
            {
              struct charset *charset;
index 860d295..ecd1a31 100644 (file)
--- a/src/fns.c
+++ b/src/fns.c
@@ -2807,9 +2807,8 @@ The data read from the system are decoded using `locale-coding-system'.  */)
          val = build_unibyte_string (str);
          /* Fixme: Is this coding system necessarily right, even if
             it is consistent with CODESET?  If not, what to do?  */
-         Faset (v, make_number (i),
-                code_convert_string_norecord (val, Vlocale_coding_system,
-                                              0));
+         ASET (v, i, code_convert_string_norecord (val, Vlocale_coding_system,
+                                                   0));
        }
       UNGCPRO;
       return v;
@@ -2829,8 +2828,8 @@ The data read from the system are decoded using `locale-coding-system'.  */)
        {
          str = nl_langinfo (months[i]);
          val = build_unibyte_string (str);
-         Faset (v, make_number (i),
-                code_convert_string_norecord (val, Vlocale_coding_system, 0));
+         ASET (v, i, code_convert_string_norecord (val, Vlocale_coding_system,
+                                                   0));
        }
       UNGCPRO;
       return v;
index 0841ad3..5fab2c9 100644 (file)
@@ -6484,12 +6484,12 @@ w32_parse_hot_key (Lisp_Object key)
 
   CHECK_VECTOR (key);
 
-  if (XFASTINT (Flength (key)) != 1)
+  if (ASIZE (key) != 1)
     return Qnil;
 
   GCPRO1 (key);
 
-  c = Faref (key, make_number (0));
+  c = AREF (key, 0);
 
   if (CONSP (c) && lucid_event_type_list_p (c))
     c = Fevent_convert_list (c);
index 37d2c75..d769f86 100644 (file)
@@ -1673,8 +1673,7 @@ selection_data_to_lisp_data (Display *display, const unsigned char *data,
          Lisp_Object v = Fmake_vector (make_number (size / sizeof (int)),
                                        make_number (0));
          for (i = 0; i < size / sizeof (int); i++)
-           Faset (v, make_number (i),
-                   x_atom_to_symbol (display, (Atom) idata[i]));
+           ASET (v, i, x_atom_to_symbol (display, (Atom) idata[i]));
          return v;
        }
     }
@@ -1699,7 +1698,7 @@ selection_data_to_lisp_data (Display *display, const unsigned char *data,
       for (i = 0; i < size / 2; i++)
        {
          short j = ((short *) data) [i];
-         Faset (v, make_number (i), make_number (j));
+         ASET (v, i, make_number (j));
        }
       return v;
     }
@@ -1711,7 +1710,7 @@ selection_data_to_lisp_data (Display *display, const unsigned char *data,
       for (i = 0; i < size / X_LONG_SIZE; i++)
        {
          int j = ((int *) data) [i];
-         Faset (v, make_number (i), INTEGER_TO_CONS (j));
+         ASET (v, i, INTEGER_TO_CONS (j));
        }
       return v;
     }