From: Stefan Monnier Date: Thu, 7 Feb 2008 04:11:05 +0000 (+0000) Subject: * xselect.c (x_handle_dnd_message): X-Git-Tag: emacs-pretest-23.0.90~8124 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3ae565b3860790e4ec77a86d0d868a16dd1953ef;p=emacs.git * 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. --- diff --git a/src/ChangeLog b/src/ChangeLog index 0ae367796c6..57529787a91 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,16 @@ +2008-02-07 Stefan Monnier + + * 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 * 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. diff --git a/src/buffer.c b/src/buffer.c index c18e3ad8ddf..f48254142e1 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -4227,8 +4227,10 @@ add_overlay_mod_hooklist (functionlist, overlay) 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 diff --git a/src/ccl.c b/src/ccl.c index dbd04d5ba14..6fc6f29d422 100644 --- a/src/ccl.c +++ b/src/ccl.c @@ -1825,7 +1825,7 @@ resolve_symbol_ccl_program (ccl) 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 @@ resolve_symbol_ccl_program (ccl) 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 @@ ccl_get_compiled_code (ccl_prog, idx) 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 @@ programs. */) 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 @@ usage: (ccl-execute-on-string CCL-PROGRAM STATUS STRING &optional CONTINUE UNIBY 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 @@ Return index number of the registered map. */) 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; } diff --git a/src/doc.c b/src/doc.c index 330e099435c..81285c0ce66 100644 --- a/src/doc.c +++ b/src/doc.c @@ -574,7 +574,7 @@ store_function_docstring (fun, offset) /* 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)); } } diff --git a/src/eval.c b/src/eval.c index fbb3a7aad34..38cf87b509a 100644 --- a/src/eval.c +++ b/src/eval.c @@ -3236,8 +3236,8 @@ DEFUN ("fetch-bytecode", Ffetch_bytecode, Sfetch_bytecode, 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; } diff --git a/src/xdisp.c b/src/xdisp.c index 6e1b06a5aee..65d63aa49a4 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -8214,7 +8214,7 @@ with_echo_area_buffer_unwind_data (w) 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 @@ with_echo_area_buffer_unwind_data (w) 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 @@ static Lisp_Object 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 @@ format_mode_line_unwind_data (obuf, save_proptrans) 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); + XSETBUFFER (tmp, obuf); else - AREF (vector, 6) = Qnil; + tmp = Qnil; + ASET (vector, 6, tmp); return vector; } @@ -9130,7 +9131,7 @@ unwind_format_mode_line (vector) 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 @@ display_menu_bar (w) 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) diff --git a/src/xmenu.c b/src/xmenu.c index 7d767665362..ad0ec34043c 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1943,7 +1943,7 @@ digest_single_submenu (start, end, top_level_items) 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 @@ digest_single_submenu (start, end, top_level_items) 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 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) 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 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) 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 */ diff --git a/src/xselect.c b/src/xselect.c index 93c4cb36bd5..0f4d62851b0 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -2791,15 +2791,15 @@ x_handle_dnd_message (f, event, dpyinfo, bufp) } 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;