- for (; !NILP (desc); desc = Fcdr (desc))
- {
- Lisp_Object button = XCAR (desc);
- widget_value *wv;
-
- if (NILP (button))
- {
- if (partition_seen)
- error ("more than one partition (nil) seen in dbox spec");
- partition_seen = 1;
- continue;
- }
- CHECK_VECTOR (button);
- wv = xmalloc_widget_value ();
-
- gui_item = gui_parse_item_keywords (button);
- if (!button_item_to_widget_value (gui_item, wv, allow_text_p, 1))
- {
- free_widget_value (wv);
- continue;
- }
-
- if (wv->type == TEXT_TYPE)
- {
- text_field_p = 1;
- allow_text_p = 0; /* only allow one */
- }
- else /* it's a button */
- {
- allow_text_p = 0; /* only allow text field at the front */
- wv->value = xstrdup (wv->name); /* what a mess... */
- wv->name = (char *) button_names [n];
-
- if (partition_seen)
- rbuttons++;
- else
- lbuttons++;
- n++;
-
- if (lbuttons > 9 || rbuttons > 9)
- error ("too many buttons (9)"); /* #### this leaks */
- }
-
- prev->next = wv;
- prev = wv;
- }
+ {
+ EXTERNAL_LIST_LOOP_2 (button, buttons)
+ {
+ widget_value *wv;
+
+ if (NILP (button))
+ {
+ if (partition_seen)
+ syntax_error ("More than one partition (nil) seen in dbox spec",
+ keys);
+ partition_seen = 1;
+ continue;
+ }
+ CHECK_VECTOR (button);
+ wv = xmalloc_widget_value ();
+
+ gui_item = gui_parse_item_keywords (button);
+ if (!button_item_to_widget_value (Qdialog,
+ gui_item, wv, allow_text_p, 1, 0, 1))
+ {
+ free_widget_value_tree (wv);
+ continue;
+ }
+
+ if (wv->type == TEXT_TYPE)
+ {
+ text_field_p = 1;
+ allow_text_p = 0; /* only allow one */
+ }
+ else /* it's a button */
+ {
+ allow_text_p = 0; /* only allow text field at the front */
+ if (wv->value)
+ xfree (wv->value);
+ wv->value = wv->name; /* what a mess... */
+ wv->name = xstrdup (button_names [n]);
+
+ if (partition_seen)
+ rbuttons++;
+ else
+ lbuttons++;
+ n++;
+
+ if (lbuttons > 9 || rbuttons > 9)
+ syntax_error ("Too many buttons (9)",
+ keys); /* #### this leaks */
+ }
+
+ prev->next = wv;
+ prev = wv;
+ }
+ }