[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can someone give me an example of the SNAME type ?
From: |
Rivka Miller |
Subject: |
Re: Can someone give me an example of the SNAME type ? |
Date: |
Wed, 08 Dec 2010 15:54:10 -0000 |
User-agent: |
G2/1.0 |
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
On Jun 30, 11:51 am, Rivka Miller <address@hidden> wrote:
> The following page describes it
>
> http://cims.nyu.edu/cgi-systems/info2html?%28elisp%29Writing%2520Emac...
>
> and this page has a pretty format
>
> http://xahlee.org/elisp/Writing-Emacs-Primitives.html#Writing-Emacs-P...
>
> Some concrete examples could clarify the basic idea to a point where I
> can write my own function with an idea of whats going on in the
> background.
>
> My school does not allow posting from the usenet, so I must use google.