From unknown Sat Aug 16 21:16:28 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#31872 <31872@debbugs.gnu.org> To: bug#31872 <31872@debbugs.gnu.org> Subject: Status: 27.0.50; nil is nil but maybe inside a list Reply-To: bug#31872 <31872@debbugs.gnu.org> Date: Sun, 17 Aug 2025 04:16:28 +0000 retitle 31872 27.0.50; nil is nil but maybe inside a list reassign 31872 emacs submitter 31872 Tomas Nordin severity 31872 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 17 06:52:11 2018 Received: (at submit) by debbugs.gnu.org; 17 Jun 2018 10:52:11 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,T_DKIM_INVALID autolearn=disabled version=3.3.2 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 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 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 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 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== 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) From: Tomas Nordin To: bug-gnu-emacs@gnu.org Subject: 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> MIME-Version: 1.0 Content-Type: text/plain 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 23 03:40:28 2018 Received: (at 31872-done) by debbugs.gnu.org; 23 Jun 2018 07:40:28 +0000 Received: from localhost ([127.0.0.1]:60738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fWd9o-0001Xr-7X for submit@debbugs.gnu.org; Sat, 23 Jun 2018 03:40:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59167) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fWd9n-0001Xf-8S for 31872-done@debbugs.gnu.org; Sat, 23 Jun 2018 03:40:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWd9e-0003Is-UW for 31872-done@debbugs.gnu.org; Sat, 23 Jun 2018 03:40:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWd9e-0003Ii-RW; Sat, 23 Jun 2018 03:40:18 -0400 Received: from [176.228.60.248] (port=1334 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fWd9e-0006z0-1x; Sat, 23 Jun 2018 03:40:18 -0400 Date: Sat, 23 Jun 2018 10:40:27 +0300 Message-Id: <83h8luuf10.fsf@gnu.org> From: Eli Zaretskii To: Tomas Nordin In-reply-to: <87lgbd8z46.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> (message from Tomas Nordin on Sun, 17 Jun 2018 12:51:37 +0200) Subject: Re: bug#31872: 27.0.50; nil is nil but maybe inside a list References: <87lgbd8z46.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 31872-done Cc: 31872-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Tomas Nordin > Date: Sun, 17 Jun 2018 12:51:37 +0200 > > 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: Thanks, I made a similar change in the manual to clarify the explanation. From unknown Sat Aug 16 21:16:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 21 Jul 2018 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator