summaryrefslogtreecommitdiff
path: root/src/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c104
1 files changed, 52 insertions, 52 deletions
diff --git a/src/eval.c b/src/eval.c
index 6940b8dbada..f549f9d1ffe 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -180,7 +180,7 @@ If all args return nil, return nil.")
Lisp_Object args_left;
struct gcpro gcpro1;
- if (NULL(args))
+ if (NILP(args))
return Qnil;
args_left = args;
@@ -189,11 +189,11 @@ If all args return nil, return nil.")
do
{
val = Feval (Fcar (args_left));
- if (!NULL (val))
+ if (!NILP (val))
break;
args_left = Fcdr (args_left);
}
- while (!NULL(args_left));
+ while (!NILP(args_left));
UNGCPRO;
return val;
@@ -210,7 +210,7 @@ If no arg yields nil, return the last arg's value.")
Lisp_Object args_left;
struct gcpro gcpro1;
- if (NULL(args))
+ if (NILP(args))
return Qt;
args_left = args;
@@ -219,11 +219,11 @@ If no arg yields nil, return the last arg's value.")
do
{
val = Feval (Fcar (args_left));
- if (NULL (val))
+ if (NILP (val))
break;
args_left = Fcdr (args_left);
}
- while (!NULL(args_left));
+ while (!NILP(args_left));
UNGCPRO;
return val;
@@ -244,7 +244,7 @@ If COND yields nil, and there are no ELSE's, the value is nil.")
cond = Feval (Fcar (args));
UNGCPRO;
- if (!NULL (cond))
+ if (!NILP (cond))
return Feval (Fcar (Fcdr (args)));
return Fprogn (Fcdr (Fcdr (args)));
}
@@ -266,11 +266,11 @@ CONDITION's value if non-nil is returned from the cond-form.")
val = Qnil;
GCPRO1 (args);
- while (!NULL (args))
+ while (!NILP (args))
{
clause = Fcar (args);
val = Feval (Fcar (clause));
- if (!NULL (val))
+ if (!NILP (val))
{
if (!EQ (XCONS (clause)->cdr, Qnil))
val = Fprogn (XCONS (clause)->cdr);
@@ -297,14 +297,14 @@ DEFUN ("progn", Fprogn, Sprogn, 0, UNEVALLED, 0,
if (!EQ (Vmocklisp_arguments, Qt))
{
val = make_number (0);
- while (!NULL (args) && (tem = Fcar (args), XTYPE (tem) == Lisp_Symbol))
+ while (!NILP (args) && (tem = Fcar (args), XTYPE (tem) == Lisp_Symbol))
{
QUIT;
specbind (tem, val), args = Fcdr (args);
}
}
- if (NULL(args))
+ if (NILP(args))
return Qnil;
args_left = args;
@@ -315,7 +315,7 @@ DEFUN ("progn", Fprogn, Sprogn, 0, UNEVALLED, 0,
val = Feval (Fcar (args_left));
args_left = Fcdr (args_left);
}
- while (!NULL(args_left));
+ while (!NILP(args_left));
UNGCPRO;
return val;
@@ -333,7 +333,7 @@ whose values are discarded.")
struct gcpro gcpro1, gcpro2;
register int argnum = 0;
- if (NULL(args))
+ if (NILP(args))
return Qnil;
args_left = args;
@@ -348,7 +348,7 @@ whose values are discarded.")
Feval (Fcar (args_left));
args_left = Fcdr (args_left);
}
- while (!NULL(args_left));
+ while (!NILP(args_left));
UNGCPRO;
return val;
@@ -368,7 +368,7 @@ whose values are discarded.")
val = Qnil;
- if (NULL(args))
+ if (NILP(args))
return Qnil;
args_left = args;
@@ -383,7 +383,7 @@ whose values are discarded.")
Feval (Fcar (args_left));
args_left = Fcdr (args_left);
}
- while (!NULL(args_left));
+ while (!NILP(args_left));
UNGCPRO;
return val;
@@ -400,7 +400,7 @@ Each SYM is set before the next VAL is computed.")
register Lisp_Object val, sym;
struct gcpro gcpro1;
- if (NULL(args))
+ if (NILP(args))
return Qnil;
args_left = args;
@@ -413,7 +413,7 @@ Each SYM is set before the next VAL is computed.")
Fset (sym, val);
args_left = Fcdr (Fcdr (args_left));
}
- while (!NULL(args_left));
+ while (!NILP(args_left));
UNGCPRO;
return val;
@@ -491,7 +491,7 @@ See also the function `interactive'.")
fn_name = Fcar (args);
defn = Fcons (Qlambda, Fcdr (args));
- if (!NULL (Vpurify_flag))
+ if (!NILP (Vpurify_flag))
defn = Fpurecopy (defn);
Ffset (fn_name, defn);
return fn_name;
@@ -512,7 +512,7 @@ and the result should be a form to be evaluated instead of the original.")
fn_name = Fcar (args);
defn = Fcons (Qmacro, Fcons (Qlambda, Fcdr (args)));
- if (!NULL (Vpurify_flag))
+ if (!NILP (Vpurify_flag))
defn = Fpurecopy (defn);
Ffset (fn_name, defn);
return fn_name;
@@ -536,16 +536,16 @@ If INITVALUE is missing, SYMBOL's value is not set.")
sym = Fcar (args);
tem = Fcdr (args);
- if (!NULL (tem))
+ if (!NILP (tem))
{
tem = Fdefault_boundp (sym);
- if (NULL (tem))
+ if (NILP (tem))
Fset_default (sym, Feval (Fcar (Fcdr (args))));
}
tem = Fcar (Fcdr (Fcdr (args)));
- if (!NULL (tem))
+ if (!NILP (tem))
{
- if (!NULL (Vpurify_flag))
+ if (!NILP (Vpurify_flag))
tem = Fpurecopy (tem);
Fput (sym, Qvariable_documentation, tem);
}
@@ -573,9 +573,9 @@ it would override the user's choice.")
sym = Fcar (args);
Fset_default (sym, Feval (Fcar (Fcdr (args))));
tem = Fcar (Fcdr (Fcdr (args)));
- if (!NULL (tem))
+ if (!NILP (tem))
{
- if (!NULL (Vpurify_flag))
+ if (!NILP (Vpurify_flag))
tem = Fpurecopy (tem);
Fput (sym, Qvariable_documentation, tem);
}
@@ -617,7 +617,7 @@ Each VALUEFORM can refer to the symbols already bound by this VARLIST.")
GCPRO3 (args, elt, varlist);
varlist = Fcar (args);
- while (!NULL (varlist))
+ while (!NILP (varlist))
{
QUIT;
elt = Fcar (varlist);
@@ -661,7 +661,7 @@ All the VALUEFORMs are evalled before any symbols are bound.")
GCPRO2 (args, *temps);
gcpro2.nvars = 0;
- for (argnum = 0; !NULL (varlist); varlist = Fcdr (varlist))
+ for (argnum = 0; !NILP (varlist); varlist = Fcdr (varlist))
{
QUIT;
elt = Fcar (varlist);
@@ -674,7 +674,7 @@ All the VALUEFORMs are evalled before any symbols are bound.")
UNGCPRO;
varlist = Fcar (args);
- for (argnum = 0; !NULL (varlist); varlist = Fcdr (varlist))
+ for (argnum = 0; !NILP (varlist); varlist = Fcdr (varlist))
{
elt = Fcar (varlist);
tem = temps[argnum++];
@@ -702,7 +702,7 @@ until TEST returns nil.")
test = Fcar (args);
body = Fcdr (args);
- while (tem = Feval (test), !NULL (tem))
+ while (tem = Feval (test), !NILP (tem))
{
QUIT;
Fprogn (body);
@@ -747,7 +747,7 @@ definitions to shadow the loaded ones for use in file byte-compilation.")
{
QUIT;
tem = Fassq (sym, env);
- if (NULL (tem))
+ if (NILP (tem))
{
def = XSYMBOL (sym)->function;
if (XTYPE (def) == Lisp_Symbol && !EQ (def, Qunbound))
@@ -770,7 +770,7 @@ definitions to shadow the loaded ones for use in file byte-compilation.")
}
/* Right now TEM is the result from SYM in ENV,
and if TEM is nil then DEF is SYM's function definition. */
- if (NULL (tem))
+ if (NILP (tem))
{
/* SYM is not mentioned in ENV.
Look at its function definition. */
@@ -782,7 +782,7 @@ definitions to shadow the loaded ones for use in file byte-compilation.")
{
/* Autoloading function: will it be a macro when loaded? */
tem = Fcar (Fnthcdr (make_number (4), def));
- if (NULL (tem))
+ if (NILP (tem))
break;
/* Yes, load it and try again. */
do_autoload (def, sym);
@@ -795,7 +795,7 @@ definitions to shadow the loaded ones for use in file byte-compilation.")
else
{
expander = XCONS (tem)->cdr;
- if (NULL (expander))
+ if (NILP (expander))
break;
}
explicit:
@@ -897,7 +897,7 @@ Both TAG and VALUE are evalled.")
while (1)
{
- if (!NULL (tag))
+ if (!NILP (tag))
for (c = catchlist; c; c = c->next)
{
if (EQ (c->tag, tag))
@@ -980,7 +980,7 @@ See also the function `signal' for more info.")
c.gcpro = gcprolist;
if (_setjmp (c.jmp))
{
- if (!NULL (h.var))
+ if (!NILP (h.var))
specbind (h.var, Fcdr (c.val));
val = Fprogn (Fcdr (Fcar (c.val)));
unbind_to (c.pdlcount, Qnil);
@@ -991,10 +991,10 @@ See also the function `signal' for more info.")
h.var = Fcar (args);
h.handler = Fcdr (Fcdr (args));
- for (val = h.handler; ! NULL (val); val = Fcdr (val))
+ for (val = h.handler; ! NILP (val); val = Fcdr (val))
{
tem = Fcar (val);
- if ((!NULL (tem)) &&
+ if ((!NILP (tem)) &&
(!CONSP (tem) || (XTYPE (XCONS (tem)->car) != Lisp_Symbol)))
error ("Invalid condition handler", tem);
}
@@ -1095,7 +1095,7 @@ See also the function `condition-case'.")
error ("Returning a value from an error is no longer supported");
#endif
- if (!NULL (clause))
+ if (!NILP (clause))
{
struct handler *h = handlerlist;
/* Restore the polling-suppression count. */
@@ -1155,7 +1155,7 @@ find_handler_clause (handlers, conditions, sig, data, debugger_value_ptr)
if (!CONSP (tem1))
continue;
tem = Fmemq (Fcar (tem1), conditions);
- if (!NULL (tem))
+ if (!NILP (tem))
return tem1;
}
return Qnil;
@@ -1202,7 +1202,7 @@ Also, a symbol satisfies `commandp' if its function definition does so.")
{
if (++i > 10) return Qnil;
tem = Ffboundp (fun);
- if (NULL (tem)) return Qnil;
+ if (NILP (tem)) return Qnil;
fun = Fsymbol_function (fun);
}
@@ -1353,7 +1353,7 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0,
if (EQ (Vmocklisp_arguments, Qt))
return Fsymbol_value (form);
val = Fsymbol_value (form);
- if (NULL (val))
+ if (NILP (val))
XFASTINT (val) = 0;
else if (EQ (val, Qt))
XFASTINT (val) = 1;
@@ -1438,7 +1438,7 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0,
gcpro3.var = vals;
gcpro3.nvars = 0;
- while (!NULL (args_left))
+ while (!NILP (args_left))
{
vals[argnum++] = Feval (Fcar (args_left));
args_left = Fcdr (args_left);
@@ -1528,7 +1528,7 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0,
done:
if (!EQ (Vmocklisp_arguments, Qt))
{
- if (NULL (val))
+ if (NILP (val))
XFASTINT (val) = 0;
else if (EQ (val, Qt))
XFASTINT (val) = 1;
@@ -1614,7 +1614,7 @@ Thus, (apply '+ 1 2 '(3 4)) returns 10.")
/* Spread the last arg we got. Its first element goes in
the slot that it used to occupy, hence this value of I. */
i = nargs - 1;
- while (!NULL (spread_arg))
+ while (!NILP (spread_arg))
{
funcall_args [i++] = XCONS (spread_arg)->car;
spread_arg = XCONS (spread_arg)->cdr;
@@ -1631,7 +1631,7 @@ apply1 (fn, arg)
struct gcpro gcpro1;
GCPRO1 (fn);
- if (NULL (arg))
+ if (NILP (arg))
RETURN_UNGCPRO (Ffuncall (1, &fn));
gcpro1.nvars = 2;
#ifdef NO_ARG_ARRAY
@@ -1942,7 +1942,7 @@ funcall_lambda (fun, nargs, arg_vector)
else abort ();
i = 0;
- for (; !NULL (syms_left); syms_left = Fcdr (syms_left))
+ for (; !NILP (syms_left); syms_left = Fcdr (syms_left))
{
QUIT;
next = Fcar (syms_left);
@@ -2042,7 +2042,7 @@ unbind_to (count, value)
int count;
Lisp_Object value;
{
- int quitf = !NULL (Vquit_flag);
+ int quitf = !NILP (Vquit_flag);
struct gcpro gcpro1;
GCPRO1 (value);
@@ -2056,12 +2056,12 @@ unbind_to (count, value)
(*specpdl_ptr->func) (specpdl_ptr->old_value);
/* Note that a "binding" of nil is really an unwind protect,
so in that case the "old value" is a list of forms to evaluate. */
- else if (NULL (specpdl_ptr->symbol))
+ else if (NILP (specpdl_ptr->symbol))
Fprogn (specpdl_ptr->old_value);
else
Fset (specpdl_ptr->symbol, specpdl_ptr->old_value);
}
- if (NULL (Vquit_flag) && quitf) Vquit_flag = Qt;
+ if (NILP (Vquit_flag) && quitf) Vquit_flag = Qt;
UNGCPRO;
@@ -2125,7 +2125,7 @@ The debugger is entered when that frame exits, if the flag is non-nil.")
}
if (backlist)
- backlist->debug_on_exit = !NULL (flag);
+ backlist->debug_on_exit = !NILP (flag);
return flag;
}
@@ -2164,7 +2164,7 @@ Output stream used is value of `standard-output'.")
if (backlist->nargs == MANY)
{
for (tail = *backlist->args, i = 0;
- !NULL (tail);
+ !NILP (tail);
tail = Fcdr (tail), i++)
{
if (i) write_string (" ", -1);