From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Drew Adams <drew.adams@oracle.com>
Newsgroups: gmane.emacs.devel
Subject: RE: Docs for &optional and &rest arguments together
Date: Thu, 31 Dec 2020 10:19:32 -0800 (PST)
Message-ID: <f3114415-7c6e-4554-bc9d-2b60371c622b@default>
References: <AM0PR06MB657709C899365FC0710F505496D80@AM0PR06MB6577.eurprd06.prod.outlook.com>
 <87o8icq958.fsf@gnus.org>
 <AM0PR06MB6577D086DD918C31A82C283F96D70@AM0PR06MB6577.eurprd06.prod.outlook.com>
 <877doyoa9g.fsf@gnus.org>
 <AM0PR06MB6577D9BA42B23A9AE54D0EDC96D60@AM0PR06MB6577.eurprd06.prod.outlook.com>
 <20201231112634.GA5158@tuxteam.de>>
 <<ac2d2cf0-db77-45e3-bc13-489bfd8c8a4b@default>
 <AM0PR06MB6577B7DEE2DE5A00D2E3166E96D60@AM0PR06MB6577.eurprd06.prod.outlook.com>
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="__160943877316658046abhmp0002.oracle.com"
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="13921"; mail-complaints-to="usenet@ciao.gmane.io"
To: arthur miller <arthur.miller@live.com>, tomas@tuxteam.de,
 emacs-devel@gnu.org
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 31 19:20:52 2020
Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>
Envelope-to: ged-emacs-devel@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
	by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.92)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>)
	id 1kv2Z9-0003VG-RR
	for ged-emacs-devel@m.gmane-mx.org; Thu, 31 Dec 2020 19:20:51 +0100
Original-Received: from localhost ([::1]:39224 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>)
	id 1kv2Z8-0004TL-PM
	for ged-emacs-devel@m.gmane-mx.org; Thu, 31 Dec 2020 13:20:50 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59208)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <drew.adams@oracle.com>)
 id 1kv2Y3-00041x-KT
 for emacs-devel@gnu.org; Thu, 31 Dec 2020 13:19:43 -0500
Original-Received: from aserp2120.oracle.com ([141.146.126.78]:60884)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <drew.adams@oracle.com>)
 id 1kv2Y1-0004Ik-1v
 for emacs-devel@gnu.org; Thu, 31 Dec 2020 13:19:42 -0500
Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1])
 by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BVIEdBU091930;
 Thu, 31 Dec 2020 18:19:36 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : subject : references :
 in-reply-to : content-type; s=corp-2020-01-29;
 bh=eLJZ4t3S1+68ECJfgIpe6KvowRFmLP7r3LimJcJB6lI=;
 b=CfMjhPFIMTWumOrLBR7gosua+MLhwJumEgVVD+9qnB4tAUTwbFzA2vMMjTrGeNQUo0ct
 Aw/48UjRDM2YqEeK13KG+Kvr5Gv5tav9MRgto8cA93CODAWCrBLXHfY0EGFnPpuygYgI
 14zWKb0ISyF0SSQWcCyRULZU93S/hqmoHn7QZXNV5JLGMNkjOGx0oVV0rYL/lp6x5aDf
 O8X7EPHUlv6wj0alTCFF3a2hVRYaOjmOgrYr+acrpWG4rsGMIcA7S/yc6VtkUw4P44UT
 K/6DW2va51UgBkPIjq34RVxgWK9zlN26Jq8EvWZoCCL0efhBq3gTgHdku4g8jAYAxzCE RA== 
Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80])
 by aserp2120.oracle.com with ESMTP id 35phm1jj9x-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
 Thu, 31 Dec 2020 18:19:35 +0000
Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1])
 by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BVIB48O172968;
 Thu, 31 Dec 2020 18:19:35 GMT
Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72])
 by userp3030.oracle.com with ESMTP id 35pf40fs8w-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Thu, 31 Dec 2020 18:19:35 +0000
Original-Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8])
 by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0BVIJXTB001412;
 Thu, 31 Dec 2020 18:19:33 GMT
In-Reply-To: <AM0PR06MB6577B7DEE2DE5A00D2E3166E96D60@AM0PR06MB6577.eurprd06.prod.outlook.com>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.5095.0 (x86)]
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9851
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0
 malwarescore=0 adultscore=0
 mlxlogscore=999 suspectscore=0 spamscore=0 phishscore=0 bulkscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2012310112
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9851
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0
 priorityscore=1501
 mlxscore=0 mlxlogscore=999 adultscore=0 bulkscore=0 malwarescore=0
 spamscore=0 impostorscore=0 phishscore=0 clxscore=1015 lowpriorityscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2012310112
Received-SPF: pass client-ip=141.146.126.78;
 envelope-from=drew.adams@oracle.com; helo=aserp2120.oracle.com
X-Spam_score_int: -42
X-Spam_score: -4.3
X-Spam_bar: ----
X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001,
 DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, RCVD_IN_DNSWL_MED=-2.3,
 RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-devel>
List-Post: <mailto:emacs-devel@gnu.org>
List-Help: <mailto:emacs-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=subscribe>
Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org
Original-Sender: "Emacs-devel"
 <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>
Xref: news.gmane.io gmane.emacs.devel:262191
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/262191>

--__160943877316658046abhmp0002.oracle.com
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

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

=20

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

=20

Both the Elisp doc and the CL doc about this are clear and complete, I thin=
k. I suggest with respect that you're maybe just not paying enough attentio=
n.

=20

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

=20

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

=20

> > I don't read it says both c and d are required
> > when &rest is also used.
>=20
> 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:

HYPERLINK "https://urldefense.com/v3/__https:/www.cs.cmu.edu/Groups/AI/html=
/cltl/clm/node64.html*SECTION00922000000000000000__;Iw!!GqivPVa7Brio!PxyUBv=
Vt3a4Eze6ZtyLlEC6A236XgfttZKnn-7gkT1H6p1FBymyit-C_eQf2-wZH$"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.

--__160943877316658046abhmp0002.oracle.com
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV=3D"Content-Type" CONTENT=
=3D"text/html; charset=3Dus-ascii"><meta name=3DGenerator content=3D"Micros=
oft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
=09{font-family:"Cambria Math";
=09panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
=09{font-family:Calibri;
=09panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
=09{font-family:"Trebuchet MS";
=09panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
=09{margin:0in;
=09margin-bottom:.0001pt;
=09font-size:12.0pt;
=09font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
=09{mso-style-priority:99;
=09color:blue;
=09text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
=09{mso-style-priority:99;
=09color:purple;
=09text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
=09{mso-style-name:msonormal;
=09mso-margin-top-alt:auto;
=09margin-right:0in;
=09mso-margin-bottom-alt:auto;
=09margin-left:0in;
=09font-size:12.0pt;
=09font-family:"Times New Roman",serif;}
p.emailquote, li.emailquote, div.emailquote
=09{mso-style-name:emailquote;
=09mso-margin-top-alt:auto;
=09margin-right:0in;
=09mso-margin-bottom-alt:auto;
=09margin-left:1.0pt;
=09border:none;
=09padding:0in;
=09font-size:12.0pt;
=09font-family:"Times New Roman",serif;}
span.EmailStyle19
=09{mso-style-type:personal-reply;
=09font-family:"Trebuchet MS",sans-serif;
=09color:#1F4E79;}
.MsoChpDefault
=09{mso-style-type:export-only;
=09font-size:10.0pt;}
@page WordSection1
=09{size:8.5in 11.0in;
=09margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
=09{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue vli=
nk=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal>&gt; I have glan=
ced through though, maybe I am missing it.<o:p></o:p></p><p class=3DMsoNorm=
al><span style=3D'font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;co=
lor:#1F4E79'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span style=
=3D'font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#1F4E79'>D=
on't just <i>glance</i>. Give it the attention that it and your understandi=
ng both deserve. If that CL doc didn't help you then I really suggest you s=
it down, take it slowly, and reread carefully.<o:p></o:p></span></p><p clas=
s=3DMsoNormal><span style=3D'font-size:10.0pt;font-family:"Trebuchet MS",sa=
ns-serif;color:#1F4E79'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><s=
pan style=3D'font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#=
1F4E79'>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.<o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'font-si=
ze:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#1F4E79'><o:p>&nbsp;<=
/o:p></span></p><p class=3DMsoNormal><span style=3D'font-size:10.0pt;font-f=
amily:"Trebuchet MS",sans-serif;color:#1F4E79'>Don't be in a hurry. The inf=
o is there; just give it a chance - and another read.<o:p></o:p></span></p>=
<p class=3DMsoNormal><span style=3D'font-size:10.0pt;font-family:"Trebuchet=
 MS",sans-serif;color:#1F4E79'><o:p>&nbsp;</o:p></span></p><div style=3D'bo=
rder:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><p c=
lass=3DMsoNormal>The CL link is not documentation, it is an essay, entire n=
ovel :-). But interestingly, that do not touch on that case either . I have=
 glanced through though, maybe I am missing it. <o:p></o:p></p><div><p clas=
s=3DMsoNormal><o:p>&nbsp;</o:p></p></div></div><div><p class=3DMsoNormal st=
yle=3D'margin-bottom:12.0pt'><span style=3D'font-size:11.0pt'>&gt; &gt; I d=
on't read it says both c and d are required<br>&gt; &gt; when &amp;rest is =
also used.<br>&gt; <br>&gt; You just have to squint the other way .-)<br>&g=
t; They are not &quot;required&quot;. They are provided -- in the call. It'=
s just<br>&gt; that c is served first, d next, and all the rest (if any) go=
es to e:<br><br>If someone finds the Elisp doc about lambda lists,<br>I rec=
ommend consulting the Common Lisp doc (CLTL2)<br>about it.&nbsp; Common Lis=
p lambda lists allow more stuff<br>(&amp;keys, &amp;aux etc.), but for the =
things that Elisp<br>has (&amp;optional, &amp;rest) the behavior is the sam=
e.<br><br>The language in CLTL2 is quite precise.&nbsp; It too<br>merits be=
ing read carefully, but I think it spells<br>things out quite clearly.<br><=
br>This is the section about lambda lists, which covers<br>&amp;optional an=
d &amp;rest:<br><br><a href=3D"https://urldefense.com/v3/__https:/www.cs.cm=
u.edu/Groups/AI/html/cltl/clm/node64.html*SECTION00922000000000000000__;Iw!=
!GqivPVa7Brio!PxyUBvVt3a4Eze6ZtyLlEC6A236XgfttZKnn-7gkT1H6p1FBymyit-C_eQf2-=
wZH$">https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node64.html#SECTION009=
22000000000000000</a><br><br>With that, plus the Elisp doc, plus this threa=
d,<br>I think things will become more clear.&nbsp; HTH.<o:p></o:p></span></=
p></div></div></div></body></html>
--__160943877316658046abhmp0002.oracle.com--