changeset 91607:d1e53221c4aa

* xselect.c (x_handle_dnd_message): * xmenu.c (digest_single_submenu, xmenu_show): * xdisp.c (with_echo_area_buffer_unwind_data, format_mode_line_unwind_data) (unwind_format_mode_line, display_menu_bar): * eval.c (Ffetch_bytecode): * doc.c (store_function_docstring): * ccl.c (resolve_symbol_ccl_program, ccl_get_compiled_code) (Fccl_execute, Fccl_execute_on_string, Fregister_code_conversion_map): * buffer.c (add_overlay_mod_hooklist): Use ASET.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 07 Feb 2008 04:11:05 +0000
parents 88c477bbeb74
children ab475ae3cab1
files src/ChangeLog src/buffer.c src/ccl.c src/doc.c src/eval.c src/xdisp.c src/xmenu.c src/xselect.c
diffstat 8 files changed, 69 insertions(+), 54 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Feb 07 01:34:52 2008 +0000
+++ b/src/ChangeLog	Thu Feb 07 04:11:05 2008 +0000
@@ -1,3 +1,16 @@
+2008-02-07  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* xselect.c (x_handle_dnd_message):
+	* xmenu.c (digest_single_submenu, xmenu_show):
+	* xdisp.c (with_echo_area_buffer_unwind_data)
+	(format_mode_line_unwind_data, unwind_format_mode_line)
+	(display_menu_bar):
+	* eval.c (Ffetch_bytecode):
+	* doc.c (store_function_docstring):
+	* ccl.c (resolve_symbol_ccl_program, ccl_get_compiled_code)
+	(Fccl_execute, Fccl_execute_on_string, Fregister_code_conversion_map):
+	* buffer.c (add_overlay_mod_hooklist): Use ASET.
+
 2008-02-07  Kenichi Handa  <handa@m17n.org>
 
 	* ftxfont.c (ftxfont_open): Don't set
@@ -9,8 +22,8 @@
 
 	* w32font.c (w32font_text_extents): Fill in lbearing metric.
 	Use cached metrics for ASCII characters.
-	(w32font_open_internal): Don't set font's owning_frame.  Cache
-	metrics for ASCII characters.
+	(w32font_open_internal): Don't set font's owning_frame.
+	Cache metrics for ASCII characters.
 
 	* w32font.h (struct w32font_info): Add ascii_metrics.
 	Remove owning_frame.
@@ -22,8 +35,7 @@
 
 	* ftxfont.c (ftxfont_draw): Use s->font_info, not face->font_info.
 
-	* ftfont.c (ftfont_open): Fix calculation of
-	font->font.averange_width.
+	* ftfont.c (ftfont_open): Fix calculation of font->font.average_width.
 
 	* charset.c (syms_of_charset): Set QCtest and Qeq.
 
--- a/src/buffer.c	Thu Feb 07 01:34:52 2008 +0000
+++ b/src/buffer.c	Thu Feb 07 04:11:05 2008 +0000
@@ -4227,8 +4227,10 @@
   if (last_overlay_modification_hooks_used == oldsize)
     last_overlay_modification_hooks = larger_vector 
       (last_overlay_modification_hooks, oldsize * 2, Qnil);
-  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); last_overlay_modification_hooks_used++;
+  ASET (last_overlay_modification_hooks, last_overlay_modification_hooks_used,
+	overlay);      last_overlay_modification_hooks_used++;
 }
 
 /* Run the modification-hooks of overlays that include
--- a/src/ccl.c	Thu Feb 07 01:34:52 2008 +0000
+++ b/src/ccl.c	Thu Feb 07 04:11:05 2008 +0000
@@ -1825,7 +1825,7 @@
 
 	  val = Fget (XCAR (contents), XCDR (contents));
 	  if (NATNUMP (val))
-	    AREF (result, i) = val;
+	    ASET (result, i, val);
 	  else
 	    unresolved = 1;
 	  continue;
@@ -1840,17 +1840,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;
 		}
@@ -1900,8 +1900,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);
 }
@@ -2039,7 +2039,7 @@
     error ("Error in CCL program at %dth code", ccl.ic);
 
   for (i = 0; i < 8; i++)
-    XSETINT (AREF (reg, i), ccl.reg[i]);
+    ASET (reg, i, make_number (ccl.reg[i]));
   return Qnil;
 }
 
@@ -2097,7 +2097,7 @@
   for (i = 0; i < 8; i++)
     {
       if (NILP (AREF (status, i)))
-	XSETINT (AREF (status, i), 0);
+	ASET (status, i, make_number (0));
       if (INTEGERP (AREF (status, i)))
 	ccl.reg[i] = XINT (AREF (status, i));
     }
@@ -2311,7 +2311,7 @@
   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;
 }
 
--- a/src/doc.c	Thu Feb 07 01:34:52 2008 +0000
+++ b/src/doc.c	Thu Feb 07 04:11:05 2008 +0000
@@ -574,7 +574,7 @@
       /* This bytecode object must have a slot for the
 	 docstring, since we've found a docstring for it.  */
       if ((ASIZE (fun) & PSEUDOVECTOR_SIZE_MASK) > COMPILED_DOC_STRING)
-	XSETFASTINT (AREF (fun, COMPILED_DOC_STRING), offset);
+	ASET (fun, COMPILED_DOC_STRING, make_number (offset));
     }
 }
 
--- a/src/eval.c	Thu Feb 07 01:34:52 2008 +0000
+++ b/src/eval.c	Thu Feb 07 04:11:05 2008 +0000
@@ -3236,8 +3236,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;
 }
--- a/src/xdisp.c	Thu Feb 07 01:34:52 2008 +0000
+++ b/src/xdisp.c	Thu Feb 07 04:11:05 2008 +0000
@@ -8214,7 +8214,7 @@
      struct window *w;
 {
   int i = 0;
-  Lisp_Object vector;
+  Lisp_Object vector, tmp;
 
   /* Reduce consing by keeping one vector in
      Vwith_echo_area_save_vector.  */
@@ -8224,22 +8224,22 @@
   if (NILP (vector))
     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;
+  XSETBUFFER (tmp, current_buffer); ASET (vector, i, tmp); ++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;
+      XSETWINDOW (tmp, w); ASET (vector, i, tmp); ++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));
@@ -9090,7 +9090,7 @@
 format_mode_line_unwind_data (obuf, save_proptrans)
      struct buffer *obuf;
 {
-  Lisp_Object vector;
+  Lisp_Object vector, tmp;
 
   /* Reduce consing by keeping one vector in
      Vwith_echo_area_save_vector.  */
@@ -9100,17 +9100,18 @@
   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;
+    XSETBUFFER (tmp, obuf);
+  else
+    tmp = Qnil;
+  ASET (vector, 6, tmp);
 
   return vector;
 }
@@ -9130,7 +9131,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;
@@ -16775,7 +16776,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)
--- a/src/xmenu.c	Thu Feb 07 01:34:52 2008 +0000
+++ b/src/xmenu.c	Thu Feb 07 04:11:05 2008 +0000
@@ -1943,7 +1943,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)
@@ -1999,13 +1999,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 */
 
@@ -2928,7 +2928,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)
@@ -2982,13 +2982,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 */
 
--- a/src/xselect.c	Thu Feb 07 01:34:52 2008 +0000
+++ b/src/xselect.c	Thu Feb 07 04:11:05 2008 +0000
@@ -2791,15 +2791,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;