R
Rivka Miller
Can someone explain me the essential parts of this function,
specifically, with some examples of SNAME ? How should the SNAME look
like ?
DEFUN ("or", For, Sor, 0, UNEVALLED, 0,
doc: /* Eval args until one of them yields non-nil, then return
that
value. The remaining args are not evalled at all.
If all args return nil, return nil.
usage: (or CONDITIONS ...) */)
(args)
Lisp_Object args;
{
register Lisp_Object val = Qnil;
struct gcpro gcpro1;
GCPRO1 (args);
while (CONSP (args))
{
val = Feval (XCAR (args));
if (!NILP (val))
break;
args = XCDR (args);
}
UNGCPRO;
return val;
}
More info here
http://xahlee.org/elisp/Writing-Emacs-Primitives.html#Writing-Emacs-Primitives
Thanks
Rivka
specifically, with some examples of SNAME ? How should the SNAME look
like ?
DEFUN ("or", For, Sor, 0, UNEVALLED, 0,
doc: /* Eval args until one of them yields non-nil, then return
that
value. The remaining args are not evalled at all.
If all args return nil, return nil.
usage: (or CONDITIONS ...) */)
(args)
Lisp_Object args;
{
register Lisp_Object val = Qnil;
struct gcpro gcpro1;
GCPRO1 (args);
while (CONSP (args))
{
val = Feval (XCAR (args));
if (!NILP (val))
break;
args = XCDR (args);
}
UNGCPRO;
return val;
}
More info here
http://xahlee.org/elisp/Writing-Emacs-Primitives.html#Writing-Emacs-Primitives
Thanks
Rivka