From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tomas Nordin Newsgroups: gmane.emacs.bugs Subject: bug#31872: 27.0.50; nil is nil but maybe inside a list Date: Sun, 17 Jun 2018 12:51:37 +0200 Message-ID: <87lgbd8z46.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1529232678 13757 195.159.176.226 (17 Jun 2018 10:51:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 17 Jun 2018 10:51:18 +0000 (UTC) To: 31872@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 17 12:51:14 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fUVH2-0003Go-At for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Jun 2018 12:51:08 +0200 Original-Received: from localhost ([::1]:54611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUVJ4-0007tZ-S7 for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Jun 2018 06:53:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUVIv-0007tM-A4 for bug-gnu-emacs@gnu.org; Sun, 17 Jun 2018 06:53:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUVIs-0000b2-8e for bug-gnu-emacs@gnu.org; Sun, 17 Jun 2018 06:53:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44692) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fUVIs-0000as-4S for bug-gnu-emacs@gnu.org; Sun, 17 Jun 2018 06:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fUVIr-0001MR-OO for bug-gnu-emacs@gnu.org; Sun, 17 Jun 2018 06:53:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tomas Nordin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Jun 2018 10:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 31872 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15292327315171 (code B ref -1); Sun, 17 Jun 2018 10:53:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Jun 2018 10:52:11 +0000 Original-Received: from localhost ([127.0.0.1]:52588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fUVI3-0001LL-5P for submit@debbugs.gnu.org; Sun, 17 Jun 2018 06:52:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fUVI0-0001L7-Tu for submit@debbugs.gnu.org; Sun, 17 Jun 2018 06:52:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUVHu-0000JJ-QJ for submit@debbugs.gnu.org; Sun, 17 Jun 2018 06:52:03 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:44027) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fUVHu-0000JD-MX for submit@debbugs.gnu.org; Sun, 17 Jun 2018 06:52:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUVHt-0007pI-F4 for bug-gnu-emacs@gnu.org; Sun, 17 Jun 2018 06:52:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUVHq-0000G4-Dx for bug-gnu-emacs@gnu.org; Sun, 17 Jun 2018 06:52:01 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:44903) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fUVHq-0000Av-3F for bug-gnu-emacs@gnu.org; Sun, 17 Jun 2018 06:51:58 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id EDE3720E74 for ; Sun, 17 Jun 2018 12:51:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1529232709; bh=fW9n6NKOHXOgIx6GdPFQNVIzPEUUBcXorJbxwhb+s3c=; h=From:To:Subject:Date:From; b=a0luzqEGE3nv+av58+70fc06cFMglF2zAk7fw6X9FOOfwq7kuoBF9hw40mN0R7p8j e1k5s1MmfdAj5dM9J4efsUjnJnYmRoUfL1NG7H1T4sV46qCJ7O6A0YudO0434b4Qc8 JOdZF5+uLj/kQB48S9vemfgegnMgzEjN1vHirDvK7C+QMdQVyh405kYDz9ULTZyNAp sE2xl/JhM7KeND02bBNZHKYorIdy6HGSBZRb4WHGpCFBDTPiiSgD1tfYoQ5z6XTeEB 28rAUG/MaNH2QM3FN0f9qCPJfSQcUANarlcYogIFMX7NnyS4LMHwmPms0hlnAiPaJ4 QT3paz28B08RA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 417rdJ1Wrbz9rxG for ; Sun, 17 Jun 2018 12:51:48 +0200 (CEST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:147570 Archived-At: Hello List I was confused some day ago about the effect of providing an explicit nil for a &rest argument in a call to a comint function. Reading the documentation on argument lists I thought there might be some room for improvement (or to make it easier to read). Hoping I have not misunderstood the workings of &rest all along, what do you think about this diff: 1 file changed, 8 insertions(+), 4 deletions(-) doc/lispref/functions.texi | 12 ++++++++---- modified doc/lispref/functions.texi @@ -412,10 +412,14 @@ Argument List binds @code{a} and @code{b} to the first two actual arguments, which are required. If one or two more arguments are provided, @code{c} and @code{d} are bound to them respectively; any arguments after the first -four are collected into a list and @code{e} is bound to that list. If -there are only two arguments, @code{c} is @code{nil}; if two or three -arguments, @code{d} is @code{nil}; if four arguments or fewer, @code{e} -is @code{nil}. +four are collected into a list and @code{e} is bound to that list. So, +if there are only two arguments, @code{c}, @code{d} and @code{e} are +@code{nil}; if two or three arguments, @code{d} and @code{e} are +@code{nil}; if four arguments or fewer, @code{e} is @code{nil}. Observe +that with five arguments with an explicit @code{nil} argument provided +for @code{e}, that @code{nil} argument is collected into a list with one +element (which is @code{nil}), as with any other single value for +@code{e}---the @code{&rest} argument. There is no way to have required arguments following optional ones---it would not make sense. To see why this must be so, suppose In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-12-17 built on fliptop Repository revision: b4486de0c6484a09dcd6485c19062419279ca296 Windowing system distributor 'The X.Org Foundation', version 11.0.11902000 System Description: Debian GNU/Linux 9.4 (stretch) Best regards -- Tomas