Commit 9a9d91d9 authored by Dmitry Antipov's avatar Dmitry Antipov
Browse files

* 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.
parent fed00072
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> 2013-02-05 Jan Djärv <jan.h.d@swipnet.se>
   
* nsmenu.m (update_frame_tool_bar): Check for negative tool bar * nsmenu.m (update_frame_tool_bar): Check for negative tool bar
......
...@@ -9783,7 +9783,7 @@ usage: (define-coding-system-internal ...) */) ...@@ -9783,7 +9783,7 @@ usage: (define-coding-system-internal ...) */)
CHECK_VECTOR (initial); CHECK_VECTOR (initial);
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
{ {
val = Faref (initial, make_number (i)); val = AREF (initial, i);
if (! NILP (val)) if (! NILP (val))
{ {
struct charset *charset; struct charset *charset;
......
...@@ -2807,9 +2807,8 @@ The data read from the system are decoded using `locale-coding-system'. */) ...@@ -2807,9 +2807,8 @@ The data read from the system are decoded using `locale-coding-system'. */)
val = build_unibyte_string (str); val = build_unibyte_string (str);
/* Fixme: Is this coding system necessarily right, even if /* Fixme: Is this coding system necessarily right, even if
it is consistent with CODESET? If not, what to do? */ it is consistent with CODESET? If not, what to do? */
Faset (v, make_number (i), ASET (v, i, code_convert_string_norecord (val, Vlocale_coding_system,
code_convert_string_norecord (val, Vlocale_coding_system, 0));
0));
} }
UNGCPRO; UNGCPRO;
return v; return v;
...@@ -2829,8 +2828,8 @@ The data read from the system are decoded using `locale-coding-system'. */) ...@@ -2829,8 +2828,8 @@ The data read from the system are decoded using `locale-coding-system'. */)
{ {
str = nl_langinfo (months[i]); str = nl_langinfo (months[i]);
val = build_unibyte_string (str); val = build_unibyte_string (str);
Faset (v, make_number (i), ASET (v, i, code_convert_string_norecord (val, Vlocale_coding_system,
code_convert_string_norecord (val, Vlocale_coding_system, 0)); 0));
} }
UNGCPRO; UNGCPRO;
return v; return v;
......
...@@ -6484,12 +6484,12 @@ w32_parse_hot_key (Lisp_Object key) ...@@ -6484,12 +6484,12 @@ w32_parse_hot_key (Lisp_Object key)
CHECK_VECTOR (key); CHECK_VECTOR (key);
if (XFASTINT (Flength (key)) != 1) if (ASIZE (key) != 1)
return Qnil; return Qnil;
GCPRO1 (key); GCPRO1 (key);
c = Faref (key, make_number (0)); c = AREF (key, 0);
if (CONSP (c) && lucid_event_type_list_p (c)) if (CONSP (c) && lucid_event_type_list_p (c))
c = Fevent_convert_list (c); c = Fevent_convert_list (c);
......
...@@ -1673,8 +1673,7 @@ selection_data_to_lisp_data (Display *display, const unsigned char *data, ...@@ -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)), Lisp_Object v = Fmake_vector (make_number (size / sizeof (int)),
make_number (0)); make_number (0));
for (i = 0; i < size / sizeof (int); i++) for (i = 0; i < size / sizeof (int); i++)
Faset (v, make_number (i), ASET (v, i, x_atom_to_symbol (display, (Atom) idata[i]));
x_atom_to_symbol (display, (Atom) idata[i]));
return v; return v;
} }
} }
...@@ -1699,7 +1698,7 @@ selection_data_to_lisp_data (Display *display, const unsigned char *data, ...@@ -1699,7 +1698,7 @@ selection_data_to_lisp_data (Display *display, const unsigned char *data,
for (i = 0; i < size / 2; i++) for (i = 0; i < size / 2; i++)
{ {
short j = ((short *) data) [i]; short j = ((short *) data) [i];
Faset (v, make_number (i), make_number (j)); ASET (v, i, make_number (j));
} }
return v; return v;
} }
...@@ -1711,7 +1710,7 @@ selection_data_to_lisp_data (Display *display, const unsigned char *data, ...@@ -1711,7 +1710,7 @@ selection_data_to_lisp_data (Display *display, const unsigned char *data,
for (i = 0; i < size / X_LONG_SIZE; i++) for (i = 0; i < size / X_LONG_SIZE; i++)
{ {
int j = ((int *) data) [i]; int j = ((int *) data) [i];
Faset (v, make_number (i), INTEGER_TO_CONS (j)); ASET (v, i, INTEGER_TO_CONS (j));
} }
return v; return v;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment