Can someone explain me parts of this function ?

Discussion in 'C Programming' started by Rivka Miller, Jul 1, 2010.

  1. Rivka Miller

    Rivka Miller Guest

    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
     
    Rivka Miller, Jul 1, 2010
    #1
    1. Advertising

  2. Rivka Miller <>, on 30/06/2010 16:02:29, wrote:

    > 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


    Try with comp.emacs and gnu.emacs.help, maybe the best places
    (currently) to get help for this issue.

    Please avoid crossposting to groups which are not topical to your
    question, good luck :)

    --
    FSC - http://userscripts.org/scripts/show/59948
    http://fscode.altervista.org - http://sardinias.com
     
    Francesco S. Carta, Jul 1, 2010
    #2
    1. Advertising

  3. Rivka Miller

    Rivka Miller Guest

    On Jun 30, 4:33 pm, "Francesco S. Carta" <> wrote:
    > Rivka Miller <>, on 30/06/2010 16:02:29, wrote:
    >
    > [see below]
    >
    > > 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-P...

    >
    > Try with comp.emacs and gnu.emacs.help, maybe the best places
    > (currently) to get help for this issue.
    >
    > Please avoid crossposting to groups which are not topical to your
    > question, good luck :)
    >
    > --
    >   FSC -http://userscripts.org/scripts/show/59948
    >  http://fscode.altervista.org-http://sardinias.com


    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-P...

    Thanks
    Rivka
     
    Rivka Miller, Jul 1, 2010
    #3
  4. Rivka Miller

    Ian Collins Guest

    On 07/ 1/10 12:51 PM, Rivka Miller wrote:
    >> FSC -http://userscripts.org/scripts/show/59948
    >> http://fscode.altervista.org-http://sardinias.com

    >
    > Can someone explain me the essential parts of this function,
    > specifically, with some examples of SNAME ? How should the SNAME look
    > like ?


    Please stop cross-posting the same off topic question!

    --
    Ian Collins
     
    Ian Collins, Jul 1, 2010
    #4
  5. Rivka Miller wrote:

    >>> Can someone explain me the essential parts of this function,
    >>> specifically, with some examples of SNAME ?


    SNO.


    How should the SNAME look
    >>> like ?


    Like Teddy Bear.

    --
    Vincenzo Mercuri
     
    Vincenzo Mercuri, Jul 1, 2010
    #5
  6. Rivka Miller

    red floyd Guest

    On 6/30/2010 4:02 PM, Rivka Miller wrote:
    > Can someone explain me the essential parts of this function,
    > specifically, with some examples of SNAME ? How should the SNAME look
    > like ?
    >
    >[redacted]


    Based on an earlier post with the same question, please see the
    comp.lang.c++ FAQ 5.2

    http://www.parashift.com/c -faq-lite
     
    red floyd, Jul 1, 2010
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    629
    Keith Thompson
    Mar 31, 2007
  2. Replies:
    1
    Views:
    980
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Apr 12, 2007
  3. kizk
    Replies:
    0
    Views:
    678
  4. Rivka Miller
    Replies:
    5
    Views:
    260
    red floyd
    Jul 1, 2010
Loading...

Share This Page