-/* DOC is ignored because it is snagged and recorded externally
- * by make-docfile */
-/* Declaring this stuff as const produces 'Cannot reinitialize' messages
- from SunPro C's fix-and-continue feature (a way neato feature that
- makes debugging unbelievably more bearable) */
-#define DEFVAR_CONSOLE_LOCAL(lname, field_name) do { \
-static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \
- = { { { symbol_value_forward_lheader_initializer, \
- (struct lcrecord_header *) &(console_local_flags.field_name), 69 }, \
- SYMVAL_SELECTED_CONSOLE_FORWARD }, 0 }; \
- defvar_console_local ((lname), &I_hate_C); \
-} while (0)
-
-#define DEFVAR_CONSOLE_LOCAL_MAGIC(lname, field_name, magicfun) do { \
-static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \
- = { { { symbol_value_forward_lheader_initializer, \
- (struct lcrecord_header *) &(console_local_flags.field_name), 69 }, \
- SYMVAL_SELECTED_CONSOLE_FORWARD }, magicfun }; \
- defvar_console_local ((lname), &I_hate_C); \
-} while (0)
-
-#define DEFVAR_CONST_CONSOLE_LOCAL(lname, field_name) do { \
-static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \
- = { { { symbol_value_forward_lheader_initializer, \
- (struct lcrecord_header *) &(console_local_flags.field_name), 69 }, \
- SYMVAL_CONST_SELECTED_CONSOLE_FORWARD }, 0 }; \
- defvar_console_local ((lname), &I_hate_C); \
-} while (0)
-
-#define DEFVAR_CONST_CONSOLE_LOCAL_MAGIC(lname, field_name, magicfun) do { \
-static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \
- = { { { symbol_value_forward_lheader_initializer, \
- (struct lcrecord_header *) &(console_local_flags.field_name), 69 }, \
- SYMVAL_CONST_SELECTED_CONSOLE_FORWARD }, magicfun }; \
- defvar_console_local ((lname), &I_hate_C); \
-} while (0)
-
-#define DEFVAR_CONSOLE_DEFAULTS(lname, field_name) do { \
-static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \
- = { { { symbol_value_forward_lheader_initializer, \
- (struct lcrecord_header *) &(console_local_flags.field_name), 69 }, \
- SYMVAL_DEFAULT_CONSOLE_FORWARD }, 0 }; \
- defvar_mumble ((lname), &I_hate_C, sizeof (I_hate_C)); \
-} while (0)
-
-#define DEFVAR_CONSOLE_DEFAULTS_MAGIC(lname, field_name, magicfun) do { \
-static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \
- = { { { symbol_value_forward_lheader_initializer, \
- (struct lcrecord_header *) &(console_local_flags.field_name), 69 }, \
- SYMVAL_DEFAULT_CONSOLE_FORWARD }, magicfun }; \
- defvar_mumble ((lname), &I_hate_C, sizeof (I_hate_C)); \
+/* The docstrings for DEFVAR_* are recorded externally by make-docfile. */
+#define DEFVAR_CONSOLE_LOCAL_1(lname, field_name, forward_type, magicfun) do { \
+ static const struct symbol_value_forward I_hate_C = \
+ { /* struct symbol_value_forward */ \
+ { /* struct symbol_value_magic */ \
+ { /* struct lcrecord_header */ \
+ { /* struct lrecord_header */ \
+ lrecord_type_symbol_value_forward, /* lrecord_type_index */ \
+ 1, /* mark bit */ \
+ 1, /* c_readonly bit */ \
+ 1 /* lisp_readonly bit */ \
+ }, \
+ 0, /* next */ \
+ 0, /* uid */ \
+ 0 /* free */ \
+ }, \
+ &(console_local_flags.field_name), \
+ forward_type \
+ }, \
+ magicfun \
+ }; \
+ \
+ { \
+ int offset = ((char *)symbol_value_forward_forward (&I_hate_C) \
+ - (char *)&console_local_flags); \
+ \
+ defvar_magic (lname, &I_hate_C); \
+ \
+ *((Lisp_Object *)(offset + (char *)XCONSOLE (Vconsole_local_symbols))) \
+ = intern (lname); \
+ } \