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 19:53:25 +0000

Jepp. I come on that after I sent first mail and didn't wanted to complicate more later. I don't think docs mention it properly.


-------- Originalmeddelande --------
Från: Daniel Brooks <db48x@db48x.net>
Datum: 2020-12-31 18:30 (GMT+01:00)
Till: arthur miller <arthur.miller@live.com>
Kopia: tomas@tuxteam.de, emacs-devel@gnu.org
Ämne: Re: Docs for &optional and &rest arguments together

arthur miller <arthur.miller@live.com> writes:

> It Is flera för me hos it work. What I am saying is that docs does not
> say that we can't omit "optional" c or d when &rest is used. In the
> examples you are illustrating with, one can't omit say d and write
> (foo a b c e), both c and d are required, so user has to pass
> explicitly at least nil if not d is provided: (foo a b c nil e)

It has the same behavior even when there is no &rest argument. The
caller cannot omit argument c while still supplying argument d without
inserting a nil: (foo a b d) vs (foo a b nil d). Both c and d are
_optional_, because the caller deson't have to supply them. But it does
have to supply the earlier ones if it wants to supply the later ones.

db48x

reply via email to

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