Lisp_Object Qfloatp;
Lisp_Object Qnumberp, Qnumber_or_marker_p;
-Lisp_Object Qinteger;
-static Lisp_Object Qsymbol, Qstring, Qcons, Qmarker, Qoverlay;
+Lisp_Object Qinteger, Qinterval, Qfloat, Qvector;
+Lisp_Object Qsymbol, Qstring, Qcons, Qmisc;
Lisp_Object Qwindow;
-static Lisp_Object Qfloat, Qwindow_configuration;
-static Lisp_Object Qprocess;
-static Lisp_Object Qcompiled_function, Qframe, Qvector;
+static Lisp_Object Qoverlay, Qwindow_configuration;
+static Lisp_Object Qprocess, Qmarker;
+static Lisp_Object Qcompiled_function, Qframe;
Lisp_Object Qbuffer;
static Lisp_Object Qchar_table, Qbool_vector, Qhash_table;
static Lisp_Object Qsubrp, Qmany, Qunevalled;
(register Lisp_Object symbol)
{
CHECK_SYMBOL (symbol);
- return (EQ (XSYMBOL (symbol)->function, Qunbound) ? Qnil : Qt);
+ return EQ (XSYMBOL (symbol)->function, Qunbound) ? Qnil : Qt;
}
DEFUN ("makunbound", Fmakunbound, Smakunbound, 1, 1, 0,
CHECK_SYMBOL (symbol);
if (NILP (symbol) || EQ (symbol, Qt))
xsignal1 (Qsetting_constant, symbol);
- XSYMBOL (symbol)->function = Qunbound;
+ set_symbol_function (symbol, Qunbound);
return symbol;
}
if (CONSP (function) && EQ (XCAR (function), Qautoload))
Fput (symbol, Qautoload, XCDR (function));
- XSYMBOL (symbol)->function = definition;
+ set_symbol_function (symbol, definition);
/* Handle automatic advice activation. */
if (CONSP (XSYMBOL (symbol)->plist)
&& !NILP (Fget (symbol, Qad_advice_info)))
(register Lisp_Object symbol, Lisp_Object newplist)
{
CHECK_SYMBOL (symbol);
- XSYMBOL (symbol)->plist = newplist;
+ set_symbol_plist (symbol, newplist);
return newplist;
}
{
struct gcpro gcpro1;
GCPRO1 (cmd);
- do_autoload (fun, cmd);
+ Fautoload_do_load (fun, cmd, Qnil);
UNGCPRO;
return Finteractive_form (cmd);
}
Lisp_Object type = XBUFFER_OBJFWD (valcontents)->slottype;
if (!(NILP (type) || NILP (newval)
- || (XINT (type) == LISP_INT_TAG
+ || (XINT (type) == Lisp_Int0
? INTEGERP (newval)
: XTYPE (newval) == XINT (type))))
buffer_slot_type_mismatch (newval, XINT (type));
{
struct buffer *b;
- for (b = all_buffers; b; b = b->header.next.buffer)
+ FOR_EACH_BUFFER (b)
if (!PER_BUFFER_VALUE_P (b, idx))
PER_BUFFER_VALUE (b, offset) = value;
}
return Qnil;
}
\f
-/* Extract and set vector and string elements */
+/* Extract and set vector and string elements. */
DEFUN ("aref", Faref, Saref, 2, 2, 0,
doc: /* Return the element of ARRAY at index IDX.
{
/* We must relocate the string data. */
ptrdiff_t nchars = SCHARS (array);
- unsigned char *str;
USE_SAFE_ALLOCA;
+ unsigned char *str = SAFE_ALLOCA (nbytes);
- SAFE_ALLOCA (str, unsigned char *, nbytes);
memcpy (str, SDATA (array), nbytes);
allocate_string_data (XSTRING (array), nchars,
nbytes + new_bytes - prev_bytes);
ptrdiff_t ok_args;
EMACS_INT ok_accum;
- switch (SWITCH_ENUM_CAST (code))
+ switch (code)
{
case Alogior:
case Alogxor:
nargs, args);
args[argnum] = val;
next = XINT (args[argnum]);
- switch (SWITCH_ENUM_CAST (code))
+ switch (code)
{
case Aadd:
if (INT_ADD_OVERFLOW (accum, next))
args[argnum] = val; /* runs into a compiler bug. */
next = XINT (args[argnum]);
}
- switch (SWITCH_ENUM_CAST (code))
+ switch (code)
{
case Aadd:
accum += next;
DEFSYM (Qwindow_configuration, "window-configuration");
DEFSYM (Qprocess, "process");
DEFSYM (Qwindow, "window");
- /* DEFSYM (Qsubr, "subr"); */
DEFSYM (Qcompiled_function, "compiled-function");
DEFSYM (Qbuffer, "buffer");
DEFSYM (Qframe, "frame");
DEFSYM (Qchar_table, "char-table");
DEFSYM (Qbool_vector, "bool-vector");
DEFSYM (Qhash_table, "hash-table");
+ /* Used by Fgarbage_collect. */
+ DEFSYM (Qinterval, "interval");
+ DEFSYM (Qmisc, "misc");
DEFSYM (Qdefun, "defun");
defsubr (&Ssubr_arity);
defsubr (&Ssubr_name);
- XSYMBOL (Qwholenump)->function = XSYMBOL (Qnatnump)->function;
+ set_symbol_function (Qwholenump, XSYMBOL (Qnatnump)->function);
DEFVAR_LISP ("most-positive-fixnum", Vmost_positive_fixnum,
doc: /* The largest value that is representable in a Lisp integer. */);