help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About `defun' in elisp manual


From: Florian v. Savigny
Subject: Re: About `defun' in elisp manual
Date: Fri, 28 Dec 2012 09:49:22 -0500

I'm not an expert, but it would seem to me that by "dotted list", you
mean a cons cell, and if BODY-FORMS is a list, the two are the
same. Try evaluating the following expression in your *scratch*
buffer:

'(foo . (bar . (fubar . (baz))))

You should get a simple list of the four elements. Elisp builds lists
out of cons cells, which is explained in the Elisp Manual, Section
5.1. (However, there is no more ASCII art, which I think is a shame.)

This is also the reason why the following expression are equivalent:

(nth 0 my-list)
(car my-list)

(I'm not sure why Elisp builds lists that way, since this is not too
intuitive, but I suspect it has something to do with the very limited
technological possibilities at the time when Emacs was first written.)

I hope I'm not completely wrong, and that this sheds some light on the
matter. (Otherwise, I'll keep quiet in the future.)

Best regards,

Florian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]