{
cp = ptr_bounds_copy (cp, b);
struct Lisp_Symbol *s = p = cp -= offset % sizeof b->symbols[0];
- if (!deadp (s->u.s.function))
+ if (!deadp (SYMBOL_FUNCTION (s)))
return make_lisp_symbol (s);
}
}
CHECK_ALLOCATED_AND_LIVE_SYMBOL ();
set_symbol_marked(ptr);
/* Attempt to catch bogus objects. */
- eassert (valid_lisp_object_p (ptr->u.s.function));
- mark_object (ptr->u.s.function);
+ eassert (valid_lisp_object_p (SYMBOL_FUNCTION (ptr)));
+ mark_object (SYMBOL_FUNCTION (ptr));
mark_object (ptr->u.s.plist);
switch (ptr->u.s.redirect)
{
}
sym->u.s.next = symbol_free_list;
symbol_free_list = sym;
- symbol_free_list->u.s.function = dead_object ();
+ /* FIXME */
+ symbol_free_list->u.s._function = dead_object ();
++this_free;
}
else
++num_used;
sym->u.s.gcmarkbit = 0;
/* Attempt to catch bogus objects. */
- eassert (valid_lisp_object_p (sym->u.s.function));
+ eassert (valid_lisp_object_p (SYMBOL_FUNCTION (sym)));
}
}
struct Lisp_Symbol *sym = XSYMBOL (symbol);
Lisp_Object val = find_symbol_value (symbol);
return (EQ (val, obj)
- || EQ (sym->u.s.function, obj)
- || (!NILP (sym->u.s.function)
- && COMPILEDP (sym->u.s.function)
- && EQ (AREF (sym->u.s.function, COMPILED_BYTECODE), obj))
+ || EQ (SYMBOL_FUNCTION (sym), obj)
+ || (!NILP (SYMBOL_FUNCTION (sym))
+ && COMPILEDP (SYMBOL_FUNCTION (sym))
+ && EQ (AREF (SYMBOL_FUNCTION (sym), COMPILED_BYTECODE), obj))
|| (!NILP (val)
&& COMPILEDP (val)
&& EQ (AREF (val, COMPILED_BYTECODE), obj)));
and the hook has a non-nil `no-self-insert' property,
return right away--don't really self-insert. */
if (SYMBOLP (sym) && ! NILP (sym)
- && ! NILP (XSYMBOL (sym)->u.s.function)
- && SYMBOLP (XSYMBOL (sym)->u.s.function))
+ && ! NILP (SYMBOL_FUNCTION (XSYMBOL (sym)))
+ && SYMBOLP (SYMBOL_FUNCTION (XSYMBOL (sym))))
{
Lisp_Object prop;
- prop = Fget (XSYMBOL (sym)->u.s.function, intern ("no-self-insert"));
+ prop = Fget (SYMBOL_FUNCTION (XSYMBOL (sym)), intern ("no-self-insert"));
if (! NILP (prop))
return 1;
}
(Lisp_Object symbol)
{
CHECK_SYMBOL (symbol);
- return NILP (XSYMBOL (symbol)->u.s.function) ? Qnil : Qt;
+ return NILP (SYMBOL_FUNCTION (XSYMBOL (symbol))) ? Qnil : Qt;
}
DEFUN ("makunbound", Fmakunbound, Smakunbound, 1, 1, 0,
(Lisp_Object symbol)
{
CHECK_SYMBOL (symbol);
- return XSYMBOL (symbol)->u.s.function;
+ return SYMBOL_FUNCTION (XSYMBOL (symbol));
}
DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0,
think this one little sanity check is worth its cost, but anyway. */
xsignal1 (Qsetting_constant, symbol);
- function = XSYMBOL (symbol)->u.s.function;
+ function = SYMBOL_FUNCTION (XSYMBOL (symbol));
if (!NILP (Vautoload_queue) && !NILP (function))
Vautoload_queue = Fcons (Fcons (symbol, function), Vautoload_queue);
{ /* Only add autoload entries after dumping, because the ones before are
not useful and else we get loads of them from the loaddefs.el. */
- if (AUTOLOADP (XSYMBOL (symbol)->u.s.function))
+ if (AUTOLOADP (SYMBOL_FUNCTION (XSYMBOL (symbol))))
/* Remember that the function was already an autoload. */
LOADHIST_ATTACH (Fcons (Qt, symbol));
LOADHIST_ATTACH (Fcons (autoload ? Qautoload : Qdefun, symbol));
{
if (!SYMBOLP (hare) || NILP (hare))
break;
- hare = XSYMBOL (hare)->u.s.function;
+ hare = SYMBOL_FUNCTION (XSYMBOL (hare));
if (!SYMBOLP (hare) || NILP (hare))
break;
- hare = XSYMBOL (hare)->u.s.function;
+ hare = SYMBOL_FUNCTION (XSYMBOL (hare));
- tortoise = XSYMBOL (tortoise)->u.s.function;
+ tortoise = SYMBOL_FUNCTION (XSYMBOL (tortoise));
if (EQ (hare, tortoise))
xsignal1 (Qcyclic_function_indirection, object);
/* Optimize for no indirection. */
result = object;
if (SYMBOLP (result) && !NILP (result)
- && (result = XSYMBOL (result)->u.s.function, SYMBOLP (result)))
+ && (result = SYMBOL_FUNCTION (XSYMBOL (result)), SYMBOLP (result)))
result = indirect_function (result);
if (!NILP (result))
return result;
defsubr (&Sbool_vector_count_consecutive);
defsubr (&Sbool_vector_count_population);
- set_symbol_function (Qwholenump, XSYMBOL (Qnatnump)->u.s.function);
+ set_symbol_function (Qwholenump, SYMBOL_FUNCTION (XSYMBOL (Qnatnump)));
DEFVAR_LISP ("most-positive-fixnum", Vmost_positive_fixnum,
doc: /* The greatest integer that is represented efficiently.
{
/* Don't use indirect_function here, or defaliases will apply their
docstrings to the base functions (Bug#2603). */
- Lisp_Object fun = SYMBOLP (obj) ? XSYMBOL (obj)->u.s.function : obj;
+ Lisp_Object fun = SYMBOLP (obj) ? SYMBOL_FUNCTION (XSYMBOL (obj)) : obj;
/* The type determines where the docstring is stored. */
tem = Fassq (sym, environment);
if (NILP (tem))
{
- def = XSYMBOL (sym)->u.s.function;
+ def = SYMBOL_FUNCTION (XSYMBOL (sym));
if (!NILP (def))
continue;
}
CHECK_STRING (file);
/* If function is defined and not as an autoload, don't override. */
- if (!NILP (XSYMBOL (function)->u.s.function)
- && !AUTOLOADP (XSYMBOL (function)->u.s.function))
+ if (!NILP (SYMBOL_FUNCTION (XSYMBOL (function)))
+ && !AUTOLOADP (SYMBOL_FUNCTION (XSYMBOL (function))))
return Qnil;
if (!NILP (Vpurify_flag) && EQ (docstring, make_fixnum (0)))
fun = original_fun;
if (!SYMBOLP (fun))
fun = Ffunction (list1 (fun));
- else if (!NILP (fun) && (fun = XSYMBOL (fun)->u.s.function, SYMBOLP (fun)))
+ else if (!NILP (fun) && (fun = SYMBOL_FUNCTION (XSYMBOL (fun)), SYMBOLP (fun)))
fun = indirect_function (fun);
if (SUBRP (fun))
/* Optimize for no indirection. */
if (SYMBOLP (fun) && !NILP (fun)
- && (fun = XSYMBOL (fun)->u.s.function, SYMBOLP (fun)))
+ && (fun = SYMBOL_FUNCTION (XSYMBOL (fun)), SYMBOLP (fun)))
{
fun = indirect_function (fun);
if (NILP (fun))
/* Optimize for no indirection. */
fun = original_fun;
if (SYMBOLP (fun) && !NILP (fun)
- && (fun = XSYMBOL (fun)->u.s.function, SYMBOLP (fun)))
+ && (fun = SYMBOL_FUNCTION (XSYMBOL (fun)), SYMBOLP (fun)))
fun = indirect_function (fun);
if (SUBRP (fun))
function = original;
if (SYMBOLP (function) && !NILP (function))
{
- function = XSYMBOL (function)->u.s.function;
+ function = SYMBOL_FUNCTION (XSYMBOL (function));
if (SYMBOLP (function))
function = indirect_function (function);
}
(such as lmenu.el set it up), check if the
original command matches the cached command. */
&& !(SYMBOLP (def)
- && EQ (tem, XSYMBOL (def)->u.s.function))))
+ && EQ (tem, SYMBOL_FUNCTION (XSYMBOL (def))))))
keys = Qnil;
}
/* Handle a symbol whose function definition is a keymap
or an array. */
if (SYMBOLP (next) && !NILP (Ffboundp (next))
- && (ARRAYP (XSYMBOL (next)->u.s.function)
- || KEYMAPP (XSYMBOL (next)->u.s.function)))
- next = Fautoload_do_load (XSYMBOL (next)->u.s.function, next, Qnil);
+ && (ARRAYP (SYMBOL_FUNCTION (XSYMBOL (next)))
+ || KEYMAPP (SYMBOL_FUNCTION (XSYMBOL (next)))))
+ next = Fautoload_do_load (SYMBOL_FUNCTION (XSYMBOL (next)), next, Qnil);
/* If the keymap gives a function, not an
array, then call the function with one arg and use
} val;
/* Function value of the symbol or Qnil if not fboundp. */
- Lisp_Object function;
+ Lisp_Object _function;
/* The symbol's property list. */
Lisp_Object plist;
return XBINDING (sym->u.s.val.value)->b[curr_lexspace];
}
+INLINE Lisp_Object
+SYMBOL_FUNCTION (struct Lisp_Symbol *sym)
+{
+ return sym->u.s._function;
+}
+
INLINE struct Lisp_Symbol *
SYMBOL_ALIAS (struct Lisp_Symbol *sym)
{
INLINE void
set_symbol_function (Lisp_Object sym, Lisp_Object function)
{
- XSYMBOL (sym)->u.s.function = function;
+ /* FIXME */
+ XSYMBOL (sym)->u.s._function = function;
}
INLINE void
{
Lisp_Object sym;
sym = intern (string);
- XSETSUBR (XSYMBOL (sym)->u.s.function, sname);
+ XSETSUBR (SYMBOL_FUNCTION (XSYMBOL (sym)), sname);
}
#endif /* NOTDEF */
Lisp_Object object,
dump_off offset)
{
-#if CHECK_STRUCTS && !defined HASH_Lisp_Symbol_999DC26DEC
+#if CHECK_STRUCTS && !defined HASH_Lisp_Symbol_B160ED845C
# error "Lisp_Symbol changed. See CHECK_STRUCTS comment in config.h."
#endif
#if CHECK_STRUCTS && !defined (HASH_symbol_redirect_ADB4F5B113)
default:
emacs_abort ();
}
- dump_field_lv (ctx, &out, symbol, &symbol->u.s.function, WEIGHT_NORMAL);
+ dump_field_lv (ctx, &out, symbol, &symbol->u.s._function, WEIGHT_NORMAL);
dump_field_lv (ctx, &out, symbol, &symbol->u.s.plist, WEIGHT_NORMAL);
dump_field_lv_rawptr (ctx, &out, symbol, &symbol->u.s.next, Lisp_Symbol,
WEIGHT_STRONG);
{
terminal->kboard = allocate_kboard (Qx);
- if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->u.s.function, Qunbound))
+ if (!EQ (SYMBOL_FUNCTION (XSYMBOL (Qvendor_specific_keysyms)), Qunbound))
{
char *vendor = ServerVendor (dpy);