From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Docs for &optional and &rest arguments together Date: Thu, 31 Dec 2020 05:43:55 +0100 Message-ID: <877doyoa9g.fsf@gnus.org> References: <87o8icq958.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26738"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Arthur Miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 31 05:44:52 2020 Return-path: 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 ) id 1kuppU-0006s3-1y for ged-emacs-devel@m.gmane-mx.org; Thu, 31 Dec 2020 05:44:52 +0100 Original-Received: from localhost ([::1]:34452 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kuppT-0008GF-4u for ged-emacs-devel@m.gmane-mx.org; Wed, 30 Dec 2020 23:44:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kupoh-0007pY-B4 for emacs-devel@gnu.org; Wed, 30 Dec 2020 23:44:03 -0500 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:34056) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kupof-0006OS-Nk for emacs-devel@gnu.org; Wed, 30 Dec 2020 23:44:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=eqV12eZTZvfqbqUQLDV2K5DRvZBEmTBMCBrGOQa8eys=; b=EmqkMH6DkU5CvgR12FBWVTyFzj HbjetMtf4ak78XvrMqDl40I35LUm48pjsaWB/hs7xAP0miwBPiw2bSEOJ3ha4f7gEtRYqlppXh4G/ BsTlNGSPahj9Ox5cNZwJTLEHYNFC1aoGknMth3p7v2B8xNPOSIM7Z7ySo7fDBcfHbkwE=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kupob-0002GM-50; Thu, 31 Dec 2020 05:44:00 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEUEAQIvFRxjJjBu OEeVKzm6SVTUja3///9ttdmYAAAAAWJLR0QHFmGI6wAAAAd0SU1FB+QMHwQdC+M8RLQAAAGwSURB VDjLvdNdcpswEAdwyekBWJIDgCDvDSIHsLzKe1utboDuf4TufyG20xnPtC9dj7HNj/2QwM79zyDv ibp/gb+Oh8kP6xLiIdyS/PVrQIw2bmfX/QnejhRGfwfT0vl+CovzfVzoClOMifo+Rh5OwYCODOZL mPTISx85jscSDDjMOKaehQfnJojCrKdWPc+XPguP5KPBSKjFFpPCG/n3MQC6nnPZIWbJZ/I1TAPA z3JAUkh0qkt8A9AVLlkkjTdAT+as71W2RE81ymKldsB7zfKTnmusi0uBDqgoluWHwnuNCqELWZvk K7xUadGx7mp4Fcm1YgIx2NovhTnNOkxurVjGWaEB0oyfBoX1ddYerW0Kdl0tClLKyt+p38H2Q1qp m34CPKABBCAZkCYe7kCktg0js97KjugTmkHBuLrd7oAZUABYfRicp73UC/O2Axauj5CnyeAbVnsP p2k1OCnkIgcohXkHD9gU+DNmbgCHUl9gzTtgrE3qDRiwOR0LIHeAFsVp94w68jWBAWx17FFFfCBB weOagl1iuwUATXfozgD76wQDlHXoHj4O0KcVgLzf7ojGH+OStcgAAAAldEVYdGRhdGU6Y3JlYXRl ADIwMjAtMTItMzFUMDQ6Mjk6MTArMDA6MDBI12lTAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTEy LTMxVDA0OjI5OjEwKzAwOjAwOYrR7wAAAABJRU5ErkJggg== X-Now-Playing: The Cure's _Pornography (1)_: "A Strange Day" In-Reply-To: (Arthur Miller's message of "Wed, 30 Dec 2020 13:19:47 +0100") Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:262140 Archived-At: Arthur Miller writes: >> 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. > > "A call to the function requires one actual argument for each of the No, this bit: For example, an argument list that looks like this: (a b &optional c d &rest e) binds a and b to the first two actual arguments, which are required. If one or two more arguments are provided, c and d are bound to them respectively; any arguments after the first four are collected into a list and e is bound to that list. Thus, if there are only two arguments, c, d and e are nil; if two or three arguments, d and e are nil; if four arguments or fewer, e is nil. Note that exactly five arguments with an explicit nil argument provided for e will cause that nil argument to be passed as a list with one element, (nil), as with any other single value for e. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no