[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LISP: Very Very Basic Question.
From: |
lawrence mitchell |
Subject: |
Re: LISP: Very Very Basic Question. |
Date: |
Wed, 09 Apr 2003 14:50:24 +0100 |
User-agent: |
Gnus/5.090018 (Oort Gnus v0.18) Emacs/21.3.50 |
Gurucharan wrote:
> Hello All,
> Can anyone explain the way in which the LISP "list"
> is implemented internally ?
It's implemented in C in Emacs. You can find the definition in
alloc.c, if you don't have the Emacs sources handy, have a look
at: <URL: http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/
src/alloc.c?rev=1.296&content-type=text/vnd.viewcvs-markup>
/----[ `list' implementation ]
| DEFUN ("list", Flist, Slist, 0, MANY, 0,
| doc: /* Return a newly created list with specified
| arguments as elements.
| Any number of arguments, even zero arguments, are allowed.
| usage: (list &rest OBJECTS) */)
| (nargs, args)
| int nargs;
| register Lisp_Object *args;
| {
| register Lisp_Object val;
| val = Qnil;
|
| while (nargs > 0)
| {
| nargs--;
| val = Fcons (args[nargs], val);
| }
| return val;
| }
\----
--
lawrence mitchell <wence@gmx.li>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: LISP: Very Very Basic Question.,
lawrence mitchell <=