aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu.c
diff options
context:
space:
mode:
authorPaul Eggert2014-09-30 20:28:16 -0700
committerPaul Eggert2014-09-30 20:28:16 -0700
commit27900ac72a8959291062eda9ef5eda9fc3f8595f (patch)
tree780e22aa62de9c01e3faf00e5c123b1dfb87ddd3 /src/menu.c
parentcebe0e68947ec46b44f5c3c9868814f8a5464173 (diff)
downloademacs-27900ac72a8959291062eda9ef5eda9fc3f8595f.tar.gz
emacs-27900ac72a8959291062eda9ef5eda9fc3f8595f.zip
Use AUTO_CONS instead of SCOPED_CONS, etc.
* doc/lispref/internals.texi (Stack-allocated Objects): Adjust to match the revised, less error-prone macros. * src/frame.h (AUTO_FRAME_ARG): Rename from FRAME_PARAMETER. * src/lisp.h (AUTO_CONS): Rename from scoped_cons. (AUTO_LIST1): Rename from scoped_list1. (AUTO_LIST2): Rename from scoped_list2. (AUTO_LIST3): Rename from scoped_list3. (AUTO_LIST4): Rename from scoped_list4. (AUTO_STRING): Rename from SCOPED_STRING. * src/frame.h (AUTO_FRAME_ARG): * src/lisp.h (AUTO_CONS, AUTO_LIST1, AUTO_LIST2, AUTO_LIST3) (AUTO_LIST4, AUTO_STRING): Prepend a new argument 'name'. Declare a variable instead of yielding a value. All uses changed. * src/lisp.h (STACK_CONS, AUTO_CONS_EXPR): New internal macros.
Diffstat (limited to 'src/menu.c')
-rw-r--r--src/menu.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/menu.c b/src/menu.c
index e63b21f0e08..61163ae0216 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -389,8 +389,11 @@ single_menu_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy, void *sk
389 { 389 {
390 if (!submenu && SREF (tem, 0) != '\0' 390 if (!submenu && SREF (tem, 0) != '\0'
391 && SREF (tem, 0) != '-') 391 && SREF (tem, 0) != '-')
392 ASET (menu_items, idx + MENU_ITEMS_ITEM_NAME, 392 {
393 concat2 (SCOPED_STRING (" "), tem)); 393 AUTO_STRING (spaces, " ");
394 ASET (menu_items, idx + MENU_ITEMS_ITEM_NAME,
395 concat2 (spaces, tem));
396 }
394 idx += MENU_ITEMS_ITEM_LENGTH; 397 idx += MENU_ITEMS_ITEM_LENGTH;
395 } 398 }
396 } 399 }
@@ -409,14 +412,20 @@ single_menu_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy, void *sk
409 prefix = " "; 412 prefix = " ";
410 413
411 if (prefix) 414 if (prefix)
412 item_string = concat2 (SCOPED_STRING (prefix), item_string); 415 {
416 AUTO_STRING (prefix_obj, prefix);
417 item_string = concat2 (prefix_obj, item_string);
418 }
413 } 419 }
414 420
415 if ((FRAME_TERMCAP_P (XFRAME (Vmenu_updating_frame)) 421 if ((FRAME_TERMCAP_P (XFRAME (Vmenu_updating_frame))
416 || FRAME_MSDOS_P (XFRAME (Vmenu_updating_frame))) 422 || FRAME_MSDOS_P (XFRAME (Vmenu_updating_frame)))
417 && !NILP (map)) 423 && !NILP (map))
418 /* Indicate visually that this is a submenu. */ 424 /* Indicate visually that this is a submenu. */
419 item_string = concat2 (item_string, SCOPED_STRING (" >")); 425 {
426 AUTO_STRING (space_gt, " >");
427 item_string = concat2 (item_string, space_gt);
428 }
420 429
421 push_menu_item (item_string, enabled, key, 430 push_menu_item (item_string, enabled, key,
422 AREF (item_properties, ITEM_PROPERTY_DEF), 431 AREF (item_properties, ITEM_PROPERTY_DEF),