aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2013-02-07 20:09:04 +0400
committerDmitry Antipov2013-02-07 20:09:04 +0400
commit9a9d91d9c247adefa7137338d7609d81734f888d (patch)
treea5f48dcb797ba46e1b7b700d96e0b850a77b1a92 /src
parentfed000725c6fc60e3919209779d60ec3adf5cb10 (diff)
downloademacs-9a9d91d9c247adefa7137338d7609d81734f888d.tar.gz
emacs-9a9d91d9c247adefa7137338d7609d81734f888d.zip
* 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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/coding.c2
-rw-r--r--src/fns.c9
-rw-r--r--src/w32fns.c4
-rw-r--r--src/xselect.c7
5 files changed, 18 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index dc0ae082ae9..9ffe133e758 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12013-02-07 Dmitry Antipov <dmantipov@yandex.ru>
2
3 * coding.c (Fdefine_coding_system_internal): Use AREF where
4 argument is known to be a vector.
5 * fns.c (Flocale_info): Likewise for ASET.
6 * xselect.c (selection_data_to_lisp_data): Likewise for ASET.
7 * w32fns.c (w32_parse_hot_key): Likewise for ASIZE and AREF.
8
12013-02-05 Jan Djärv <jan.h.d@swipnet.se> 92013-02-05 Jan Djärv <jan.h.d@swipnet.se>
2 10
3 * nsmenu.m (update_frame_tool_bar): Check for negative tool bar 11 * 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 ...) */)
9783 CHECK_VECTOR (initial); 9783 CHECK_VECTOR (initial);
9784 for (i = 0; i < 4; i++) 9784 for (i = 0; i < 4; i++)
9785 { 9785 {
9786 val = Faref (initial, make_number (i)); 9786 val = AREF (initial, i);
9787 if (! NILP (val)) 9787 if (! NILP (val))
9788 { 9788 {
9789 struct charset *charset; 9789 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'. */)
2807 val = build_unibyte_string (str); 2807 val = build_unibyte_string (str);
2808 /* Fixme: Is this coding system necessarily right, even if 2808 /* Fixme: Is this coding system necessarily right, even if
2809 it is consistent with CODESET? If not, what to do? */ 2809 it is consistent with CODESET? If not, what to do? */
2810 Faset (v, make_number (i), 2810 ASET (v, i, code_convert_string_norecord (val, Vlocale_coding_system,
2811 code_convert_string_norecord (val, Vlocale_coding_system, 2811 0));
2812 0));
2813 } 2812 }
2814 UNGCPRO; 2813 UNGCPRO;
2815 return v; 2814 return v;
@@ -2829,8 +2828,8 @@ The data read from the system are decoded using `locale-coding-system'. */)
2829 { 2828 {
2830 str = nl_langinfo (months[i]); 2829 str = nl_langinfo (months[i]);
2831 val = build_unibyte_string (str); 2830 val = build_unibyte_string (str);
2832 Faset (v, make_number (i), 2831 ASET (v, i, code_convert_string_norecord (val, Vlocale_coding_system,
2833 code_convert_string_norecord (val, Vlocale_coding_system, 0)); 2832 0));
2834 } 2833 }
2835 UNGCPRO; 2834 UNGCPRO;
2836 return v; 2835 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)
6484 6484
6485 CHECK_VECTOR (key); 6485 CHECK_VECTOR (key);
6486 6486
6487 if (XFASTINT (Flength (key)) != 1) 6487 if (ASIZE (key) != 1)
6488 return Qnil; 6488 return Qnil;
6489 6489
6490 GCPRO1 (key); 6490 GCPRO1 (key);
6491 6491
6492 c = Faref (key, make_number (0)); 6492 c = AREF (key, 0);
6493 6493
6494 if (CONSP (c) && lucid_event_type_list_p (c)) 6494 if (CONSP (c) && lucid_event_type_list_p (c))
6495 c = Fevent_convert_list (c); 6495 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,
1673 Lisp_Object v = Fmake_vector (make_number (size / sizeof (int)), 1673 Lisp_Object v = Fmake_vector (make_number (size / sizeof (int)),
1674 make_number (0)); 1674 make_number (0));
1675 for (i = 0; i < size / sizeof (int); i++) 1675 for (i = 0; i < size / sizeof (int); i++)
1676 Faset (v, make_number (i), 1676 ASET (v, i, x_atom_to_symbol (display, (Atom) idata[i]));
1677 x_atom_to_symbol (display, (Atom) idata[i]));
1678 return v; 1677 return v;
1679 } 1678 }
1680 } 1679 }
@@ -1699,7 +1698,7 @@ selection_data_to_lisp_data (Display *display, const unsigned char *data,
1699 for (i = 0; i < size / 2; i++) 1698 for (i = 0; i < size / 2; i++)
1700 { 1699 {
1701 short j = ((short *) data) [i]; 1700 short j = ((short *) data) [i];
1702 Faset (v, make_number (i), make_number (j)); 1701 ASET (v, i, make_number (j));
1703 } 1702 }
1704 return v; 1703 return v;
1705 } 1704 }
@@ -1711,7 +1710,7 @@ selection_data_to_lisp_data (Display *display, const unsigned char *data,
1711 for (i = 0; i < size / X_LONG_SIZE; i++) 1710 for (i = 0; i < size / X_LONG_SIZE; i++)
1712 { 1711 {
1713 int j = ((int *) data) [i]; 1712 int j = ((int *) data) [i];
1714 Faset (v, make_number (i), INTEGER_TO_CONS (j)); 1713 ASET (v, i, INTEGER_TO_CONS (j));
1715 } 1714 }
1716 return v; 1715 return v;
1717 } 1716 }