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 10:19:32 -0800 (PST)

> I have glanced through though, maybe I am missing it.

 

Don't just glance. Give it the attention that it and your understanding both deserve. If that CL doc didn't help you then I really suggest you sit down, take it slowly, and reread carefully.

 

Both the Elisp doc and the CL doc about this are clear and complete, I think. I suggest with respect that you're maybe just not paying enough attention.

 

Don't be in a hurry. The info is there; just give it a chance - and another read.

 

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.

 

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