emacs-devel
[Top][All Lists]
Advanced

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

RE: Docs for &optional and &rest arguments together


From: arthur miller
Subject: RE: Docs for &optional and &rest arguments together
Date: Thu, 31 Dec 2020 17:28:07 +0000

The CL link is not documentation, it is an essay, entire novel :-). But interestingly, that do not touch on that case either . I have glanced through though, maybe I am missing it.


-------- Originalmeddelande --------
Från: Drew Adams <drew.adams@oracle.com>
Datum: 2020-12-31 17:48 (GMT+01:00)
Till: tomas@tuxteam.de, emacs-devel@gnu.org
Ämne: RE: Docs for &optional and &rest arguments together

> > I don't read it says both c and d are required
> > when &rest is also used.
>
> You just have to squint the other way .-)
> They are not "required". They are provided -- in the call. It's just
> that c is served first, d next, and all the rest (if any) goes to e:

If someone finds the Elisp doc about lambda lists,
I recommend consulting the Common Lisp doc (CLTL2)
about it.  Common Lisp lambda lists allow more stuff
(&keys, &aux etc.), but for the things that Elisp
has (&optional, &rest) the behavior is the same.

The language in CLTL2 is quite precise.  It too
merits being read carefully, but I think it spells
things out quite clearly.

This is the section about lambda lists, which covers
&optional and &rest:

https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node64.html#SECTION00922000000000000000

With that, plus the Elisp doc, plus this thread,
I think things will become more clear.  HTH.


reply via email to

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