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 08:45:49 -0800 (PST) Message-ID: <ac2d2cf0-db77-45e3-bc13-489bfd8c8a4b@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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23431"; mail-complaints-to="usenet@ciao.gmane.io" To: 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 17:49:13 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 1kv18T-0005zl-6i for ged-emacs-devel@m.gmane-mx.org; Thu, 31 Dec 2020 17:49:13 +0100 Original-Received: from localhost ([::1]:34690 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 1kv18S-0002u6-80 for ged-emacs-devel@m.gmane-mx.org; Thu, 31 Dec 2020 11:49:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39606) 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 1kv17F-00021Y-2W for emacs-devel@gnu.org; Thu, 31 Dec 2020 11:47:57 -0500 Original-Received: from userp2130.oracle.com ([156.151.31.86]:50774) 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 1kv17D-0004Bc-8O for emacs-devel@gnu.org; Thu, 31 Dec 2020 11:47:56 -0500 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BVGjRvP018226; Thu, 31 Dec 2020 16:47:53 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 : content-transfer-encoding; s=corp-2020-01-29; bh=PhYkq3yW4LDHocJ0xxvcN03Pm8xkj3n6I94H92li6LI=; b=xVI9oJW3FC8Jb80TeHinVz3f0l2avMkg1yV9P68bD3cOMhXDGPClLFyjei6wh10+z7Ot jF/5YTjQ0vlLKo9lblg8rxB3XU1Qpaeso0uywQ4II1bY/+LoRz70Le4a2zEZWzVM+77c rX9SY3JNSPY6HI8w4kT02wPIPKxwaQ/dT1SeACajpceL5OEaaV/DOp/XuCkuGTM3g4B7 D3y8pdPalj3Afr0su7sAu5akunocvcLoiSrCUB2JuR/5AQpWCpxDv7vl04aDVq1s3Hrr nHfPgZAB6/xeocGWt3cwOhTmr5r5OErDVHbUd/DJq2I5n31E0T7xcIR9bXSck1gMHSVF ug== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 35nvkqugta-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 31 Dec 2020 16:47:52 +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 0BVGf4Va011631; Thu, 31 Dec 2020 16:45:52 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 35pf40dn7s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 31 Dec 2020 16:45:52 +0000 Original-Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0BVGjorl025487; Thu, 31 Dec 2020 16:45:50 GMT In-Reply-To: <20201231112634.GA5158@tuxteam.de> 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-2012310101 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9851 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 bulkscore=0 adultscore=0 priorityscore=1501 malwarescore=0 impostorscore=0 suspectscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012310101 Received-SPF: pass client-ip=156.151.31.86; envelope-from=drew.adams@oracle.com; helo=userp2130.oracle.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, 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:262179 Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/262179> > > 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: https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node64.html#SECTION009220000= 00000000000 With that, plus the Elisp doc, plus this thread, I think things will become more clear. HTH.