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: Lars Ingebrigtsen
Subject: Re: Docs for &optional and &rest arguments together
Date: Wed, 30 Dec 2020 04:12:51 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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

> (required-vars…
>  [&optional [optional-vars…]]
>  [&rest [rest-var]])
>
> But when I use it, I still have to pass a nil for the "optional"
> argument, which I think is also not so strange either, otherwise how
> will Emacs now where "optional" argument list ends and where "rest"
> argument list starts? No?

Right.

> If actual arguments for the optional and rest variables are omitted,
> then they always default to nil."
>
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Argument-List.html
>
> I get the impression that I actually can omit the optional argument(s)
> even when followed by the &rest keyword.

The paragraph just below this one, though, describes in detail what
happens with a mixed &optional and &rest argument list, so that's not my
impression when reading that node.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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