From: Dmitry Antipov Date: Thu, 7 Feb 2013 16:09:04 +0000 (+0400) Subject: * coding.c (Fdefine_coding_system_internal): Use AREF where X-Git-Tag: emacs-24.3.90~173^2~7^2~133 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9a9d91d9c247adefa7137338d7609d81734f888d;p=emacs.git * 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. --- diff --git a/src/ChangeLog b/src/ChangeLog index dc0ae082ae9..9ffe133e758 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2013-02-07 Dmitry Antipov + + * 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 * nsmenu.m (update_frame_tool_bar): Check for negative tool bar diff --git a/src/coding.c b/src/coding.c index 93da9db0d36..c7bfe25e0cc 100644 --- a/src/coding.c +++ b/src/coding.c @@ -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; diff --git a/src/fns.c b/src/fns.c index 860d295d5a0..ecd1a31335a 100644 --- 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; diff --git a/src/w32fns.c b/src/w32fns.c index 0841ad3468e..5fab2c9a3df 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -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); diff --git a/src/xselect.c b/src/xselect.c index 37d2c753c5e..d769f86cdef 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -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; }