+2018-12-28 Tom Tromey <tom@tromey.com>
+
+ * command.h (add_setshow_enum_cmd): Add "context" argument.
+ * cli/cli-decode.c (add_setshow_enum_cmd): Add "context"
+ argument. Call set_cmd_context.
+
2018-12-28 Tom Tromey <tom@tromey.com>
* utils.c (filter_initialized): New global.
cmd_const_sfunc_ftype *set_func,
show_value_ftype *show_func,
struct cmd_list_element **set_list,
- struct cmd_list_element **show_list)
+ struct cmd_list_element **show_list,
+ void *context)
{
- struct cmd_list_element *c;
+ struct cmd_list_element *c, *show;
add_setshow_cmd_full (name, theclass, var_enum, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
- &c, NULL);
+ &c, &show);
c->enums = enumlist;
+
+ set_cmd_context (c, context);
+ set_cmd_context (show, context);
}
const char * const auto_boolean_enums[] = { "on", "off", "auto", NULL };
cmd_const_sfunc_ftype *set_func,
show_value_ftype *show_func,
struct cmd_list_element **set_list,
- struct cmd_list_element **show_list);
+ struct cmd_list_element **show_list,
+ void *context = nullptr);
extern void add_setshow_auto_boolean_cmd (const char *name,
enum command_class theclass,