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: Drew Adams
Subject: RE: Docs for &optional and &rest arguments together
Date: Thu, 31 Dec 2020 08:45:49 -0800 (PST)

> > 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]