From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Patch: AREF -vs- ASET Date: 01 Feb 2007 19:46:29 -0700 Message-ID: Reply-To: tromey@redhat.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1170392275 32307 80.91.229.12 (2 Feb 2007 04:57:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 2 Feb 2007 04:57:55 +0000 (UTC) To: Emacs Hackers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 02 05:57:48 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HCqUY-0007NT-Qq for ged-emacs-devel@m.gmane.org; Fri, 02 Feb 2007 05:57:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCqUX-0004SJ-U4 for ged-emacs-devel@m.gmane.org; Thu, 01 Feb 2007 23:57:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HCqUK-0004Ps-J2 for emacs-devel@gnu.org; Thu, 01 Feb 2007 23:57:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HCqUI-0004Mu-Nl for emacs-devel@gnu.org; Thu, 01 Feb 2007 23:57:27 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCqUI-0004Mh-KF for emacs-devel@gnu.org; Thu, 01 Feb 2007 23:57:26 -0500 Original-Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HCqUH-00076X-Ux for emacs-devel@gnu.org; Thu, 01 Feb 2007 23:57:26 -0500 Original-Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l124vKUU021621 for ; Thu, 1 Feb 2007 23:57:20 -0500 Original-Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l124vKxF014628 for ; Thu, 1 Feb 2007 23:57:20 -0500 Original-Received: from opsy.redhat.com (ton.toronto.redhat.com [172.16.14.15]) by pobox.corp.redhat.com (8.13.1/8.12.8) with ESMTP id l124vI2F011205; Thu, 1 Feb 2007 23:57:19 -0500 Original-Received: by opsy.redhat.com (Postfix, from userid 500) id 4BD5D378746; Thu, 1 Feb 2007 19:46:29 -0700 (MST) X-Attribution: Tom Original-Lines: 689 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:65759 Archived-At: I noticed that Emacs has both AREF and ASET macros, but they are not consistently used. Sometimes ASET is used to set an array element, but sometimes AREF is used instead. This patch mostly changes Emacs to use ASET rather than AREF. I chose this, rather than removing ASET, because using a settor macro like ASET allows the future possibility of a write barrier, needed for some kinds of GC. Unfortunately it is not possible to change AREF to use LISP_MAKE_RVALUE, because there is code like: XSETBUFFER (AREF (vector, i), current_buffer); ... but, more importantly, macros like LFACE_HEIGHT, which expand to AREF and for which there is no "SET" equivalent. These problems are fixable, of course. But is this the direction the Emacs maintainers want to go? Tom Index: ChangeLog from Tom Tromey * xselect.c (x_handle_dnd_message): Use ASET. * xmenu.c (digest_single_submenu): Use ASET. (xmenu_show): Likewise. * xfaces.c (Finternal_make_lisp_face): Use ASET. * xdisp.c (with_echo_area_buffer_unwind_data): Use ASET. (format_mode_line_unwind_data): Likewise. (unwind_format_mode_line): Likewise. (display_menu_bar): Likewise. * macmenu.c (digest_single_submenu): Use ASET. (mac_menu_show): Likewise. * keyboard.c (add_command_key): Use ASET. (parse_menu_item): Likewise. * fontset.c (make_fontset): Use ASET. (free_face_fontset): Likewise. (Ffontset_info): Likewise. (syms_of_fontset): Likewise. * fns.c (concat): Use ASET. (hash_clear): Likewise. * eval.c (Ffetch_bytecode): Use ASET. * ccl.c (resolve_symbol_ccl_program): Use ASET. (ccl_get_compiled_code): Likewise. (Fregister_code_conversion_map): Likewise. * buffer.c (add_overlay_mod_hooklist): Use ASET. Index: buffer.c =================================================================== RCS file: /sources/emacs/emacs/src/buffer.c,v retrieving revision 1.521 diff -u -r1.521 buffer.c --- buffer.c 21 Jan 2007 04:18:17 -0000 1.521 +++ buffer.c 2 Feb 2007 04:44:47 -0000 @@ -4185,8 +4185,12 @@ XVECTOR (last_overlay_modification_hooks)->contents, sizeof (Lisp_Object) * oldsize); } - AREF (last_overlay_modification_hooks, last_overlay_modification_hooks_used++) = functionlist; - AREF (last_overlay_modification_hooks, last_overlay_modification_hooks_used++) = overlay; + ASET (last_overlay_modification_hooks, + last_overlay_modification_hooks_used++, + functionlist); + ASET (last_overlay_modification_hooks, + last_overlay_modification_hooks_used++, + overlay); } /* Run the modification-hooks of overlays that include Index: ccl.c =================================================================== RCS file: /sources/emacs/emacs/src/ccl.c,v retrieving revision 1.96 diff -u -r1.96 ccl.c --- ccl.c 21 Jan 2007 04:18:16 -0000 1.96 +++ ccl.c 2 Feb 2007 04:44:49 -0000 @@ -1988,7 +1988,7 @@ val = Fget (XCAR (contents), XCDR (contents)); if (NATNUMP (val)) - AREF (result, i) = val; + ASET (result, i, val); else unresolved = 1; continue; @@ -2003,17 +2003,17 @@ val = Fget (contents, Qtranslation_table_id); if (NATNUMP (val)) - AREF (result, i) = val; + ASET (result, i, val); else { val = Fget (contents, Qcode_conversion_map_id); if (NATNUMP (val)) - AREF (result, i) = val; + ASET (result, i, val); else { val = Fget (contents, Qccl_program_idx); if (NATNUMP (val)) - AREF (result, i) = val; + ASET (result, i, val); else unresolved = 1; } @@ -2063,8 +2063,8 @@ val = resolve_symbol_ccl_program (AREF (slot, 1)); if (! VECTORP (val)) return Qnil; - AREF (slot, 1) = val; - AREF (slot, 2) = Qt; + ASET (slot, 1, val); + ASET (slot, 2, Qt); } return AREF (slot, 1); } @@ -2421,15 +2421,14 @@ int j; for (j = 0; j < len; j++) - AREF (new_vector, j) - = AREF (Vcode_conversion_map_vector, j); + ASET (new_vector, j, AREF (Vcode_conversion_map_vector, j)); Vcode_conversion_map_vector = new_vector; } index = make_number (i); Fput (symbol, Qcode_conversion_map, map); Fput (symbol, Qcode_conversion_map_id, index); - AREF (Vcode_conversion_map_vector, i) = Fcons (symbol, map); + ASET (Vcode_conversion_map_vector, i, Fcons (symbol, map)); return index; } Index: eval.c =================================================================== RCS file: /sources/emacs/emacs/src/eval.c,v retrieving revision 1.276 diff -u -r1.276 eval.c --- eval.c 21 Jan 2007 04:18:16 -0000 1.276 +++ eval.c 2 Feb 2007 04:44:54 -0000 @@ -1238,7 +1238,7 @@ the handler stack as we go, so that the proper handlers are in effect for each unwind-protect clause we run. At the end, restore some static info saved in CATCH, and longjmp to the location - specified in the + specified there. This is used for correct unwinding in Fthrow and Fsignal. */ @@ -3208,8 +3208,8 @@ else error ("Invalid byte code"); } - AREF (object, COMPILED_BYTECODE) = XCAR (tem); - AREF (object, COMPILED_CONSTANTS) = XCDR (tem); + ASET (object, COMPILED_BYTECODE, XCAR (tem)); + ASET (object, COMPILED_CONSTANTS, XCDR (tem)); } return object; } Index: fns.c =================================================================== RCS file: /sources/emacs/emacs/src/fns.c,v retrieving revision 1.424 diff -u -r1.424 fns.c --- fns.c 21 Jan 2007 04:18:16 -0000 1.424 +++ fns.c 2 Feb 2007 04:44:59 -0000 @@ -780,7 +780,7 @@ tail = XCDR (tail); } else if (VECTORP (val)) - AREF (val, toindex++) = elt; + ASET (val, toindex++, elt); else { CHECK_NUMBER (elt); @@ -4863,7 +4863,7 @@ } for (i = 0; i < ASIZE (h->index); ++i) - AREF (h->index, i) = Qnil; + ASET (h->index, i, Qnil); h->next_free = make_number (0); h->count = make_number (0); Index: fontset.c =================================================================== RCS file: /sources/emacs/emacs/src/fontset.c,v retrieving revision 1.103 diff -u -r1.103 fontset.c --- fontset.c 21 Jan 2007 20:49:43 -0000 1.103 +++ fontset.c 2 Feb 2007 04:45:00 -0000 @@ -396,7 +396,7 @@ tem = Fmake_vector (make_number (size + 8), Qnil); for (i = 0; i < size; i++) - AREF (tem, i) = AREF (Vfontset_table, i); + ASET (tem, i, AREF (Vfontset_table, i)); Vfontset_table = tem; } @@ -407,7 +407,7 @@ FONTSET_FRAME (fontset) = frame; FONTSET_BASE (fontset) = base; - AREF (Vfontset_table, id) = fontset; + ASET (Vfontset_table, id, fontset); next_fontset_id = id + 1; return fontset; } @@ -493,7 +493,7 @@ { if (fontset_id_valid_p (face->fontset)) { - AREF (Vfontset_table, face->fontset) = Qnil; + ASET (Vfontset_table, face->fontset, Qnil); if (face->fontset < next_fontset_id) next_fontset_id = face->fontset; } @@ -1528,8 +1528,8 @@ fontp = (*query_font_func) (f, SDATA (elt)); } val = Fmake_vector (make_number (3), val); - AREF (val, 0) = fontp ? make_number (fontp->size) : make_number (0); - AREF (val, 1) = fontp ? make_number (fontp->height) : make_number (0); + ASET (val, 0, fontp ? make_number (fontp->size) : make_number (0)); + ASET (val, 1, fontp ? make_number (fontp->height) : make_number (0)); return val; } @@ -1653,7 +1653,7 @@ FONTSET_ID (Vdefault_fontset) = make_number (0); FONTSET_NAME (Vdefault_fontset) = build_string ("-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"); - AREF (Vfontset_table, 0) = Vdefault_fontset; + ASET (Vfontset_table, 0, Vdefault_fontset); next_fontset_id = 1; Voverriding_fontspec_alist = Qnil; Index: keyboard.c =================================================================== RCS file: /sources/emacs/emacs/src/keyboard.c,v retrieving revision 1.892 diff -u -r1.892 keyboard.c --- keyboard.c 27 Jan 2007 18:18:31 -0000 1.892 +++ keyboard.c 2 Feb 2007 04:45:20 -0000 @@ -966,7 +966,7 @@ 2 * ASIZE (this_command_keys), Qnil); - AREF (this_command_keys, this_command_key_count) = key; + ASET (this_command_keys, this_command_key_count, key); ++this_command_key_count; } @@ -7468,11 +7468,11 @@ /* Initialize optional entries. */ for (i = ITEM_PROPERTY_DEF; i < ITEM_PROPERTY_ENABLE; i++) - AREF (item_properties, i) = Qnil; - AREF (item_properties, ITEM_PROPERTY_ENABLE) = Qt; + ASET (item_properties, i, Qnil); + ASET (item_properties, ITEM_PROPERTY_ENABLE, Qt); /* Save the item here to protect it from GC. */ - AREF (item_properties, ITEM_PROPERTY_ITEM) = item; + ASET (item_properties, ITEM_PROPERTY_ITEM, item); item_string = XCAR (item); @@ -7481,12 +7481,12 @@ if (STRINGP (item_string)) { /* Old format menu item. */ - AREF (item_properties, ITEM_PROPERTY_NAME) = item_string; + ASET (item_properties, ITEM_PROPERTY_NAME, item_string); /* Maybe help string. */ if (CONSP (item) && STRINGP (XCAR (item))) { - AREF (item_properties, ITEM_PROPERTY_HELP) = XCAR (item); + ASET (item_properties, ITEM_PROPERTY_HELP, XCAR (item)); start = item; item = XCDR (item); } @@ -7501,27 +7501,27 @@ } /* This is the real definition--the function to run. */ - AREF (item_properties, ITEM_PROPERTY_DEF) = item; + ASET (item_properties, ITEM_PROPERTY_DEF, item); /* Get enable property, if any. */ if (SYMBOLP (item)) { tem = Fget (item, Qmenu_enable); if (!NILP (Venable_disabled_menus_and_buttons)) - AREF (item_properties, ITEM_PROPERTY_ENABLE) = Qt; + ASET (item_properties, ITEM_PROPERTY_ENABLE, Qt); else if (!NILP (tem)) - AREF (item_properties, ITEM_PROPERTY_ENABLE) = tem; + ASET (item_properties, ITEM_PROPERTY_ENABLE, tem); } } else if (EQ (item_string, Qmenu_item) && CONSP (item)) { /* New format menu item. */ - AREF (item_properties, ITEM_PROPERTY_NAME) = XCAR (item); + ASET (item_properties, ITEM_PROPERTY_NAME, XCAR (item)); start = XCDR (item); if (CONSP (start)) { /* We have a real binding. */ - AREF (item_properties, ITEM_PROPERTY_DEF) = XCAR (start); + ASET (item_properties, ITEM_PROPERTY_DEF, XCAR (start)); item = XCDR (start); /* Is there a cache list with key equivalences. */ @@ -7540,9 +7540,9 @@ if (EQ (tem, QCenable)) { if (!NILP (Venable_disabled_menus_and_buttons)) - AREF (item_properties, ITEM_PROPERTY_ENABLE) = Qt; + ASET (item_properties, ITEM_PROPERTY_ENABLE, Qt); else - AREF (item_properties, ITEM_PROPERTY_ENABLE) = XCAR (item); + ASET (item_properties, ITEM_PROPERTY_ENABLE, XCAR (item)); } else if (EQ (tem, QCvisible) && !notreal) { @@ -7553,7 +7553,7 @@ return 0; } else if (EQ (tem, QChelp)) - AREF (item_properties, ITEM_PROPERTY_HELP) = XCAR (item); + ASET (item_properties, ITEM_PROPERTY_HELP, XCAR (item)); else if (EQ (tem, QCfilter)) filter = item; else if (EQ (tem, QCkey_sequence)) @@ -7568,7 +7568,7 @@ { tem = XCAR (item); if (CONSP (tem) || (STRINGP (tem) && NILP (cachelist))) - AREF (item_properties, ITEM_PROPERTY_KEYEQ) = tem; + ASET (item_properties, ITEM_PROPERTY_KEYEQ, tem); } else if (EQ (tem, QCbutton) && CONSP (XCAR (item))) { @@ -7577,10 +7577,10 @@ type = XCAR (tem); if (EQ (type, QCtoggle) || EQ (type, QCradio)) { - AREF (item_properties, ITEM_PROPERTY_SELECTED) - = XCDR (tem); - AREF (item_properties, ITEM_PROPERTY_TYPE) - = type; + ASET (item_properties, ITEM_PROPERTY_SELECTED, + XCDR (tem)); + ASET (item_properties, ITEM_PROPERTY_TYPE, + type); } } item = XCDR (item); @@ -7600,7 +7600,7 @@ item_string = menu_item_eval_property (item_string); if (!STRINGP (item_string)) return 0; - AREF (item_properties, ITEM_PROPERTY_NAME) = item_string; + ASET (item_properties, ITEM_PROPERTY_NAME, item_string); } /* If got a filter apply it on definition. */ @@ -7610,7 +7610,7 @@ def = menu_item_eval_property (list2 (XCAR (filter), list2 (Qquote, def))); - AREF (item_properties, ITEM_PROPERTY_DEF) = def; + ASET (item_properties, ITEM_PROPERTY_DEF, def); } /* Enable or disable selection of item. */ @@ -7623,7 +7623,7 @@ tem = menu_item_eval_property (tem); if (inmenubar && NILP (tem)) return 0; /* Ignore disabled items in menu bar. */ - AREF (item_properties, ITEM_PROPERTY_ENABLE) = tem; + ASET (item_properties, ITEM_PROPERTY_ENABLE, tem); } /* If we got no definition, this item is just unselectable text which @@ -7637,8 +7637,8 @@ /* For a subkeymap, just record its details and exit. */ if (CONSP (tem)) { - AREF (item_properties, ITEM_PROPERTY_MAP) = tem; - AREF (item_properties, ITEM_PROPERTY_DEF) = tem; + ASET (item_properties, ITEM_PROPERTY_MAP, tem); + ASET (item_properties, ITEM_PROPERTY_DEF, tem); return 1; } @@ -7761,7 +7761,7 @@ return 1; /* If we have an equivalent key binding, use that. */ - AREF (item_properties, ITEM_PROPERTY_KEYEQ) = tem; + ASET (item_properties, ITEM_PROPERTY_KEYEQ, tem); /* Include this when menu help is implemented. tem = XVECTOR (item_properties)->contents[ITEM_PROPERTY_HELP]; @@ -7777,8 +7777,8 @@ /* Handle radio buttons or toggle boxes. */ tem = AREF (item_properties, ITEM_PROPERTY_SELECTED); if (!NILP (tem)) - AREF (item_properties, ITEM_PROPERTY_SELECTED) - = menu_item_eval_property (tem); + ASET (item_properties, ITEM_PROPERTY_SELECTED, + menu_item_eval_property (tem)); return 1; } Index: macmenu.c =================================================================== RCS file: /sources/emacs/emacs/src/macmenu.c,v retrieving revision 1.54 diff -u -r1.54 macmenu.c --- macmenu.c 21 Jan 2007 04:18:15 -0000 1.54 +++ macmenu.c 2 Feb 2007 04:45:29 -0000 @@ -1417,7 +1417,7 @@ if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) { pane_name = ENCODE_MENU_STRING (pane_name); - AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name; + ASET (menu_items, i + MENU_ITEMS_PANE_NAME, pane_name); } #endif pane_string = (NILP (pane_name) @@ -1473,13 +1473,13 @@ if (STRING_MULTIBYTE (item_name)) { item_name = ENCODE_MENU_STRING (item_name); - AREF (menu_items, i + MENU_ITEMS_ITEM_NAME) = item_name; + ASET (menu_items, i + MENU_ITEMS_ITEM_NAME, item_name); } if (STRINGP (descrip) && STRING_MULTIBYTE (descrip)) { descrip = ENCODE_MENU_STRING (descrip); - AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY) = descrip; + ASET (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY, descrip); } #endif /* not HAVE_MULTILINGUAL_MENU */ @@ -2085,7 +2085,7 @@ if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) { pane_name = ENCODE_MENU_STRING (pane_name); - AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name; + ASET (menu_items, i + MENU_ITEMS_PANE_NAME, pane_name); } #endif pane_string = (NILP (pane_name) @@ -2139,13 +2139,13 @@ if (STRINGP (item_name) && STRING_MULTIBYTE (item_name)) { item_name = ENCODE_MENU_STRING (item_name); - AREF (menu_items, i + MENU_ITEMS_ITEM_NAME) = item_name; + ASET (menu_items, i + MENU_ITEMS_ITEM_NAME, item_name); } if (STRINGP (descrip) && STRING_MULTIBYTE (descrip)) { descrip = ENCODE_MENU_STRING (descrip); - AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY) = descrip; + ASET (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY, descrip); } #endif /* not HAVE_MULTILINGUAL_MENU */ Index: xdisp.c =================================================================== RCS file: /sources/emacs/emacs/src/xdisp.c,v retrieving revision 1.1139 diff -u -r1.1139 xdisp.c --- xdisp.c 21 Jan 2007 23:29:20 -0000 1.1139 +++ xdisp.c 2 Feb 2007 04:46:00 -0000 @@ -7967,21 +7967,21 @@ vector = Fmake_vector (make_number (7), Qnil); XSETBUFFER (AREF (vector, i), current_buffer); ++i; - AREF (vector, i) = Vdeactivate_mark, ++i; - AREF (vector, i) = make_number (windows_or_buffers_changed), ++i; + ASET (vector, i, Vdeactivate_mark); ++i; + ASET (vector, i, make_number (windows_or_buffers_changed)); ++i; if (w) { XSETWINDOW (AREF (vector, i), w); ++i; - AREF (vector, i) = w->buffer; ++i; - AREF (vector, i) = make_number (XMARKER (w->pointm)->charpos); ++i; - AREF (vector, i) = make_number (XMARKER (w->pointm)->bytepos); ++i; + ASET (vector, i, w->buffer); ++i; + ASET (vector, i, make_number (XMARKER (w->pointm)->charpos)); ++i; + ASET (vector, i, make_number (XMARKER (w->pointm)->bytepos)); ++i; } else { int end = i + 4; for (; i < end; ++i) - AREF (vector, i) = Qnil; + ASET (vector, i, Qnil); } xassert (i == ASIZE (vector)); @@ -8844,17 +8844,17 @@ if (NILP (vector)) vector = Fmake_vector (make_number (7), Qnil); - AREF (vector, 0) = make_number (mode_line_target); - AREF (vector, 1) = make_number (MODE_LINE_NOPROP_LEN (0)); - AREF (vector, 2) = mode_line_string_list; - AREF (vector, 3) = (save_proptrans ? mode_line_proptrans_alist : Qt); - AREF (vector, 4) = mode_line_string_face; - AREF (vector, 5) = mode_line_string_face_prop; + ASET (vector, 0, make_number (mode_line_target)); + ASET (vector, 1, make_number (MODE_LINE_NOPROP_LEN (0))); + ASET (vector, 2, mode_line_string_list); + ASET (vector, 3, (save_proptrans ? mode_line_proptrans_alist : Qt)); + ASET (vector, 4, mode_line_string_face); + ASET (vector, 5, mode_line_string_face_prop); if (obuf) XSETBUFFER (AREF (vector, 6), obuf); else - AREF (vector, 6) = Qnil; + ASET (vector, 6, Qnil); return vector; } @@ -8874,7 +8874,7 @@ if (!NILP (AREF (vector, 6))) { set_buffer_internal_1 (XBUFFER (AREF (vector, 6))); - AREF (vector, 6) = Qnil; + ASET (vector, 6, Qnil); } Vmode_line_unwind_vector = vector; @@ -16475,7 +16475,7 @@ break; /* Remember where item was displayed. */ - AREF (items, i + 3) = make_number (it.hpos); + ASET (items, i + 3, make_number (it.hpos)); /* Display the item, pad with one space. */ if (it.current_x < it.last_visible_x) Index: xfaces.c =================================================================== RCS file: /sources/emacs/emacs/src/xfaces.c,v retrieving revision 1.358 diff -u -r1.358 xfaces.c --- xfaces.c 21 Jan 2007 04:18:14 -0000 1.358 +++ xfaces.c 2 Feb 2007 04:46:11 -0000 @@ -3866,7 +3866,7 @@ { global_lface = Fmake_vector (make_number (LFACE_VECTOR_SIZE), Qunspecified); - AREF (global_lface, 0) = Qface; + ASET (global_lface, 0, Qface); Vface_new_frame_defaults = Fcons (Fcons (face, global_lface), Vface_new_frame_defaults); @@ -3888,7 +3888,7 @@ } else if (f == NULL) for (i = 1; i < LFACE_VECTOR_SIZE; ++i) - AREF (global_lface, i) = Qunspecified; + ASET (global_lface, i, Qunspecified); /* Add a frame-local definition. */ if (f) @@ -3897,12 +3897,12 @@ { lface = Fmake_vector (make_number (LFACE_VECTOR_SIZE), Qunspecified); - AREF (lface, 0) = Qface; + ASET (lface, 0, Qface); f->face_alist = Fcons (Fcons (face, lface), f->face_alist); } else for (i = 1; i < LFACE_VECTOR_SIZE; ++i) - AREF (lface, i) = Qunspecified; + ASET (lface, i, Qunspecified); } else lface = global_lface; Index: xmenu.c =================================================================== RCS file: /sources/emacs/emacs/src/xmenu.c,v retrieving revision 1.317 diff -u -r1.317 xmenu.c --- xmenu.c 21 Jan 2007 04:18:14 -0000 1.317 +++ xmenu.c 2 Feb 2007 04:46:15 -0000 @@ -1934,7 +1934,7 @@ if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) { pane_name = ENCODE_MENU_STRING (pane_name); - AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name; + ASET (menu_items, i + MENU_ITEMS_PANE_NAME, pane_name); } #endif pane_string = (NILP (pane_name) @@ -1990,13 +1990,13 @@ if (STRING_MULTIBYTE (item_name)) { item_name = ENCODE_MENU_STRING (item_name); - AREF (menu_items, i + MENU_ITEMS_ITEM_NAME) = item_name; + ASET (menu_items, i + MENU_ITEMS_ITEM_NAME, item_name); } if (STRINGP (descrip) && STRING_MULTIBYTE (descrip)) { descrip = ENCODE_MENU_STRING (descrip); - AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY) = descrip; + ASET (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY, descrip); } #endif /* not HAVE_MULTILINGUAL_MENU */ @@ -2898,7 +2898,7 @@ if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) { pane_name = ENCODE_MENU_STRING (pane_name); - AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name; + ASET (menu_items, i + MENU_ITEMS_PANE_NAME, pane_name); } #endif pane_string = (NILP (pane_name) @@ -2952,13 +2952,13 @@ if (STRINGP (item_name) && STRING_MULTIBYTE (item_name)) { item_name = ENCODE_MENU_STRING (item_name); - AREF (menu_items, i + MENU_ITEMS_ITEM_NAME) = item_name; + ASET (menu_items, i + MENU_ITEMS_ITEM_NAME, item_name); } if (STRINGP (descrip) && STRING_MULTIBYTE (descrip)) { descrip = ENCODE_MENU_STRING (descrip); - AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY) = descrip; + ASET (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY, descrip); } #endif /* not HAVE_MULTILINGUAL_MENU */ Index: xselect.c =================================================================== RCS file: /sources/emacs/emacs/src/xselect.c,v retrieving revision 1.167 diff -u -r1.167 xselect.c --- xselect.c 21 Jan 2007 04:18:14 -0000 1.167 +++ xselect.c 2 Feb 2007 04:46:19 -0000 @@ -2765,15 +2765,15 @@ } vec = Fmake_vector (make_number (4), Qnil); - AREF (vec, 0) = SYMBOL_NAME (x_atom_to_symbol (FRAME_X_DISPLAY (f), - event->message_type)); - AREF (vec, 1) = frame; - AREF (vec, 2) = make_number (event->format); - AREF (vec, 3) = x_property_data_to_lisp (f, - data, - event->message_type, - event->format, - size); + ASET (vec, 0, SYMBOL_NAME (x_atom_to_symbol (FRAME_X_DISPLAY (f), + event->message_type))); + ASET (vec, 1, frame); + ASET (vec, 2, make_number (event->format)); + ASET (vec, 3, x_property_data_to_lisp (f, + data, + event->message_type, + event->format, + size)); mouse_position_for_drop (f, &x, &y); bufp->kind = DRAG_N_DROP_EVENT;