retrieved in a specific domain (window, frame, device) by looking
through the possible instantiators (i.e. settings). This process is
called \"instantiation\".
-
+
To put settings into a specifier, use `set-specifier', or the
lower-level functions `add-spec-to-specifier' and
`add-spec-list-to-specifier'. You can also temporarily bind a setting
}
DEFUN ("add-spec-list-to-specifier", Fadd_spec_list_to_specifier, 2, 3, 0, /*
-Add a spec-list (a list of specifications) to SPECIFIER.
-The format of a spec-list is
+Add SPEC-LIST (a list of specifications) to SPECIFIER.
+The format of SPEC-LIST is
((LOCALE (TAG-SET . INSTANTIATOR) ...) ...)
Lisp_Object window = Qnil;
Lisp_Object frame = Qnil;
Lisp_Object device = Qnil;
- Lisp_Object tag = Qnil;
- struct device *d;
- Lisp_Specifier *sp;
-
- sp = XSPECIFIER (specifier);
+ Lisp_Object tag = Qnil; /* #### currently unused */
+ Lisp_Specifier *sp = XSPECIFIER (specifier);
/* Attempt to determine buffer, window, frame, and device from the
domain. */
abort ();
if (NILP (buffer) && !NILP (window))
- buffer = XWINDOW (window)->buffer;
+ buffer = WINDOW_BUFFER (XWINDOW (window));
if (NILP (frame) && !NILP (window))
frame = XWINDOW (window)->frame;
if (NILP (device))
/* frame had better exist; if device is undeterminable, something
really went wrong. */
- device = XFRAME (frame)->device;
+ device = FRAME_DEVICE (XFRAME (frame));
/* device had better be determined by now; abort if not. */
- d = XDEVICE (device);
- tag = DEVICE_CLASS (d);
+ tag = DEVICE_CLASS (XDEVICE (device));
depth = make_int (1 + XINT (depth));
if (XINT (depth) > 20)
int struct_frame_offset,
void (*value_changed_in_frame)
(Lisp_Object specifier, struct frame *f,
- Lisp_Object oldval))
+ Lisp_Object oldval),
+ int always_recompute)
{
Lisp_Specifier *sp = XSPECIFIER (specifier);
assert (!GHOST_SPECIFIER_P (sp));
sp->caching->value_changed_in_window = value_changed_in_window;
sp->caching->offset_into_struct_frame = struct_frame_offset;
sp->caching->value_changed_in_frame = value_changed_in_frame;
+ sp->caching->always_recompute = always_recompute;
Vcached_specifiers = Fcons (specifier, Vcached_specifiers);
if (BODILY_SPECIFIER_P (sp))
GHOST_SPECIFIER(sp)->caching = sp->caching;
struct window *w)
{
Lisp_Object window;
- Lisp_Object newval, *location;
+ Lisp_Object newval, *location, oldval;
assert (!GHOST_SPECIFIER_P (XSPECIFIER (specifier)));
calling equal is no good either as this doesn't take into account
things attached to the specifier - for instance strings on
extents. --andyp */
- if (!EQ (newval, *location))
+ if (!EQ (newval, *location) || XSPECIFIER (specifier)->caching->always_recompute)
{
- Lisp_Object oldval = *location;
+ oldval = *location;
*location = newval;
(XSPECIFIER (specifier)->caching->value_changed_in_window)
(specifier, w, oldval);
struct frame *f)
{
Lisp_Object frame;
- Lisp_Object newval, *location;
+ Lisp_Object newval, *location, oldval;
assert (!GHOST_SPECIFIER_P (XSPECIFIER (specifier)));
method. */
location = (Lisp_Object *)
((char *) f + XSPECIFIER (specifier)->caching->offset_into_struct_frame);
- if (!EQ (newval, *location))
+ if (!EQ (newval, *location) || XSPECIFIER (specifier)->caching->always_recompute)
{
- Lisp_Object oldval = *location;
+ oldval = *location;
*location = newval;
(XSPECIFIER (specifier)->caching->value_changed_in_frame)
(specifier, f, oldval);