Skip to content

Instantly share code, notes, and snippets.

@gbrls
Created March 28, 2020 23:43
Show Gist options
  • Save gbrls/69aa58b3b1dc1963d3b697cb5ccdfa7b to your computer and use it in GitHub Desktop.
Save gbrls/69aa58b3b1dc1963d3b697cb5ccdfa7b to your computer and use it in GitHub Desktop.
c comment macro
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...) */)
(Lisp_Object args)
{
Lisp_Object val = Qnil;
while (CONSP (args))
{
Lisp_Object arg = XCAR (args);
args = XCDR (args);
val = eval_sub (arg);
if (!NILP (val))
break;
}
return val;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment