(A-IWDSU+7375): New abstract node.
[chise/xemacs-chise.git.1] / src / specifier.h
index 5758637..918d06d 100644 (file)
@@ -152,9 +152,9 @@ struct specifier_methods
      name specifier_instance) to avoid creating "external"
      specification loops.
 
      name specifier_instance) to avoid creating "external"
      specification loops.
 
-     This method must presume that both INSTANTIATOR and MATCSPEC are
+     This method must presume that both INSTANTIATOR and MATCHSPEC are
      already validated by the corresponding validate_* methods, and
      already validated by the corresponding validate_* methods, and
-     may abort if they are invalid.
+     may ABORT if they are invalid.
 
      Return value is an instance, which is returned immediately to the
      caller, or Qunbound to continue instantiation lookup chain.
 
      Return value is an instance, which is returned immediately to the
      caller, or Qunbound to continue instantiation lookup chain.
@@ -235,7 +235,7 @@ struct Lisp_Specifier
   Lisp_Object fallback;
 
   /* type-specific extra data attached to a specifier */
   Lisp_Object fallback;
 
   /* type-specific extra data attached to a specifier */
-  char data[1];
+  max_align_t data[1];
 };
 typedef struct Lisp_Specifier Lisp_Specifier;
 
 };
 typedef struct Lisp_Specifier Lisp_Specifier;
 
@@ -261,7 +261,7 @@ DECLARE_LRECORD (specifier, Lisp_Specifier);
 
 /***** Defining new specifier types *****/
 
 
 /***** Defining new specifier types *****/
 
-#define specifier_data_offset (offsetof (Lisp_Specifier, data))
+#define specifier_data_offset offsetof (Lisp_Specifier, data)
 extern const struct lrecord_description specifier_empty_extra_description[];
 
 #ifdef ERROR_CHECK_TYPECHECK
 extern const struct lrecord_description specifier_empty_extra_description[];
 
 #ifdef ERROR_CHECK_TYPECHECK
@@ -300,14 +300,15 @@ extern struct specifier_methods * type##_specifier_methods
 #define DEFINE_SPECIFIER_TYPE(type)                                    \
 struct specifier_methods * type##_specifier_methods
 
 #define DEFINE_SPECIFIER_TYPE(type)                                    \
 struct specifier_methods * type##_specifier_methods
 
-#define INITIALIZE_SPECIFIER_TYPE(type, obj_name, pred_sym) do {       \
-  type##_specifier_methods = xnew_and_zero (struct specifier_methods); \
-  type##_specifier_methods->name = obj_name;                           \
-  type##_specifier_methods->extra_description =                                \
-    specifier_empty_extra_description;                                 \
-  defsymbol_nodump (&type##_specifier_methods->predicate_symbol, pred_sym); \
-  add_entry_to_specifier_type_list (Q##type, type##_specifier_methods);            \
-  dumpstruct (&type##_specifier_methods, &specifier_methods_description);   \
+#define INITIALIZE_SPECIFIER_TYPE(type, obj_name, pred_sym) do {               \
+  type##_specifier_methods = xnew_and_zero (struct specifier_methods);         \
+  type##_specifier_methods->name = obj_name;                                   \
+  type##_specifier_methods->extra_description =                                        \
+    specifier_empty_extra_description;                                         \
+  defsymbol_nodump (&type##_specifier_methods->predicate_symbol, pred_sym);    \
+  add_entry_to_specifier_type_list (Q##type, type##_specifier_methods);                \
+  dump_add_root_struct_ptr (&type##_specifier_methods,                         \
+                           &specifier_methods_description);                    \
 } while (0)
 
 #define REINITIALIZE_SPECIFIER_TYPE(type) do {                         \
 } while (0)
 
 #define REINITIALIZE_SPECIFIER_TYPE(type) do {                         \
@@ -411,11 +412,12 @@ struct specifier_caching
   int offset_into_struct_frame;
   void (*value_changed_in_frame) (Lisp_Object specifier, struct frame *f,
                                  Lisp_Object oldval);
   int offset_into_struct_frame;
   void (*value_changed_in_frame) (Lisp_Object specifier, struct frame *f,
                                  Lisp_Object oldval);
+  int always_recompute;
 };
 
 /* #### get image instances out of domains! */
 
 };
 
 /* #### get image instances out of domains! */
 
-/* #### I think the following should abort() rather than return nil
+/* #### I think the following should ABORT() rather than return nil
    when an invalid domain is given; much more likely we'll catch design
    errors early. --ben */
 
    when an invalid domain is given; much more likely we'll catch design
    errors early. --ben */
 
@@ -480,7 +482,8 @@ void set_specifier_caching (Lisp_Object specifier,
                            int struct_frame_offset,
                            void (*value_changed_in_frame)
                            (Lisp_Object specifier, struct frame *f,
                            int struct_frame_offset,
                            void (*value_changed_in_frame)
                            (Lisp_Object specifier, struct frame *f,
-                            Lisp_Object oldval));
+                            Lisp_Object oldval),
+                           int always_recompute);
 void set_specifier_fallback (Lisp_Object specifier,
                             Lisp_Object fallback);
 void recompute_all_cached_specifiers_in_window (struct window *w);
 void set_specifier_fallback (Lisp_Object specifier,
                             Lisp_Object fallback);
 void recompute_all_cached_specifiers_in_window (struct window *w);