* 4. Add a FROB line for it in xemacs_debug_loop.
*/
-Lisp_Object Qredisplay, Qbuffers, Qfaces;
-Lisp_Object Qwindows, Qframes, Qdevices;
+static Lisp_Object Qredisplay, Qbuffers, Qfaces, Qwindows, Qframes, Qdevices;
struct debug_classes active_debug_classes;
enum debug_loop
{
- ADD,
- DELETE,
- LIST,
- ACTIVE,
- INIT,
- VALIDATE,
- TYPE,
- SETTYPE
+ X_ADD,
+ X_DELETE,
+ X_LIST,
+ X_ACTIVE,
+ X_INIT,
+ X_VALIDATE,
+ X_TYPE,
+ X_SETTYPE
};
static Lisp_Object
xemacs_debug_loop (enum debug_loop op, Lisp_Object class, Lisp_Object type)
{
- int flag = ((op == ADD) ? 1 : 0);
+ int flag = (op == X_ADD) ? 1 : 0;
Lisp_Object retval = Qnil;
-#define FROB(item)\
- if (op == LIST || op == ACTIVE || op == INIT || EQ (class, Q##item)) \
+#define FROB(item) \
+ if (op == X_LIST || op == X_ACTIVE || op == X_INIT || EQ (class, Q##item)) \
{ \
- if (op == ADD || op == DELETE || op == INIT) \
+ if (op == X_ADD || op == X_DELETE || op == X_INIT) \
active_debug_classes.item = flag; \
- else if (op == LIST \
- || (op == ACTIVE && active_debug_classes.item)) \
+ else if (op == X_LIST \
+ || (op == X_ACTIVE && active_debug_classes.item)) \
retval = Fcons (Q##item, retval); \
- else if (op == VALIDATE) \
+ else if (op == X_VALIDATE) \
return Qt; \
- else if (op == SETTYPE) \
+ else if (op == X_SETTYPE) \
active_debug_classes.types_of_##item = XINT (type); \
- else if (op == TYPE) \
- retval = make_int (active_debug_classes.types_of_##item), Qnil; \
- if (op == INIT) active_debug_classes.types_of_##item = VALBITS; \
+ else if (op == X_TYPE) \
+ retval = make_int (active_debug_classes.types_of_##item); \
+ if (op == X_INIT) active_debug_classes.types_of_##item = VALBITS; \
}
FROB (redisplay);
*/
(class))
{
- if (NILP (xemacs_debug_loop (VALIDATE, class, Qnil)))
+ if (NILP (xemacs_debug_loop (X_VALIDATE, class, Qnil)))
error ("No such debug class exists");
else
- xemacs_debug_loop (ADD, class, Qnil);
+ xemacs_debug_loop (X_ADD, class, Qnil);
- return (xemacs_debug_loop (ACTIVE, Qnil, Qnil));
+ return (xemacs_debug_loop (X_ACTIVE, Qnil, Qnil));
}
DEFUN ("delete-debug-class-to-check", Fdelete_debug_class_to_check, 1, 1, 0, /*
*/
(class))
{
- if (NILP (xemacs_debug_loop (VALIDATE, class, Qnil)))
+ if (NILP (xemacs_debug_loop (X_VALIDATE, class, Qnil)))
error ("No such debug class exists");
else
- xemacs_debug_loop (DELETE, class, Qnil);
+ xemacs_debug_loop (X_DELETE, class, Qnil);
- return (xemacs_debug_loop (ACTIVE, Qnil, Qnil));
+ return (xemacs_debug_loop (X_ACTIVE, Qnil, Qnil));
}
DEFUN ("debug-classes-being-checked", Fdebug_classes_being_checked, 0, 0, 0, /*
*/
())
{
- return (xemacs_debug_loop (ACTIVE, Qnil, Qnil));
+ return (xemacs_debug_loop (X_ACTIVE, Qnil, Qnil));
}
DEFUN ("debug-classes-list", Fdebug_classes_list, 0, 0, 0, /*
*/
())
{
- return (xemacs_debug_loop (LIST, Qnil, Qnil));
+ return (xemacs_debug_loop (X_LIST, Qnil, Qnil));
}
DEFUN ("set-debug-classes-to-check", Fset_debug_classes_to_check, 1, 1, 0, /*
valid, reject the entire list without doing anything. */
LIST_LOOP (rest, classes )
{
- if (NILP (xemacs_debug_loop (VALIDATE, XCAR (rest), Qnil)))
+ if (NILP (xemacs_debug_loop (X_VALIDATE, XCAR (rest), Qnil)))
error ("Invalid object in class list");
}
LIST_LOOP (rest, classes)
Fadd_debug_class_to_check (XCAR (rest));
- return (xemacs_debug_loop (ACTIVE, Qnil, Qnil));
+ return (xemacs_debug_loop (X_ACTIVE, Qnil, Qnil));
}
DEFUN ("set-debug-class-types-to-check", Fset_debug_class_types_to_check, 2, 2, 0, /*
(class, type))
{
CHECK_INT (type);
- if (NILP (xemacs_debug_loop (VALIDATE, class, Qnil)))
+ if (NILP (xemacs_debug_loop (X_VALIDATE, class, Qnil)))
error ("Invalid debug class");
- xemacs_debug_loop (SETTYPE, class, type);
+ xemacs_debug_loop (X_SETTYPE, class, type);
- return (xemacs_debug_loop (TYPE, class, Qnil));
+ return (xemacs_debug_loop (X_TYPE, class, Qnil));
}
DEFUN ("debug-types-being-checked", Fdebug_types_being_checked, 1, 1, 0, /*
*/
(class))
{
- if (NILP (xemacs_debug_loop (VALIDATE, class, Qnil)))
+ if (NILP (xemacs_debug_loop (X_VALIDATE, class, Qnil)))
error ("Invalid debug class");
- return (xemacs_debug_loop (TYPE, class, Qnil));
+ return (xemacs_debug_loop (X_TYPE, class, Qnil));
}
void
defsymbol (&Qwindows, "windows");
defsymbol (&Qframes, "frames");
defsymbol (&Qdevices, "devices");
- /* defsymbol (&Qbyte_code, "byte-code"); in bytecode.c */
DEFSUBR (Fadd_debug_class_to_check);
DEFSUBR (Fdelete_debug_class_to_check);
}
void
-vars_of_debug (void)
+reinit_vars_of_debug (void)
{
/* If you need to have any classes active early on in startup, then
the flags should be set here.
All functions called by this function are "allowed" according
to emacs.c. */
- xemacs_debug_loop (INIT, Qnil, Qnil);
+ xemacs_debug_loop (X_INIT, Qnil, Qnil);
+}
+
+void
+vars_of_debug (void)
+{
+ reinit_vars_of_debug ();
}