From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#16963: A patch to create a list-with-tail primitive. Date: Thu, 27 Jun 2019 20:30:27 -0700 (PDT) Message-ID: <7c902ff5-10cb-467c-b5ed-bf9d4df8cf71@default> References: <1394200708.1710.4.camel@localhost.localdomain> <877fhuom68.fsf@gnus.org> <87v9wq5rl4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="91320"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 16963@debbugs.gnu.org, Demetrios Obenour To: Noam Postavsky , Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 28 05:31:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hghbS-000NZo-Sg for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Jun 2019 05:31:10 +0200 Original-Received: from localhost ([::1]:55982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hghbR-0005y8-SG for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Jun 2019 23:31:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36483) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hghbL-0005xg-J1 for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 23:31:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hghbK-0004RL-E7 for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 23:31:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54862) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hghbK-0004R6-9S for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 23:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hghbK-0006rv-4p for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 23:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jun 2019 03:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16963 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 16963-submit@debbugs.gnu.org id=B16963.156169264526381 (code B ref 16963); Fri, 28 Jun 2019 03:31:02 +0000 Original-Received: (at 16963) by debbugs.gnu.org; 28 Jun 2019 03:30:45 +0000 Original-Received: from localhost ([127.0.0.1]:40173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hghb3-0006rP-6r for submit@debbugs.gnu.org; Thu, 27 Jun 2019 23:30:45 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:58462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hghay-0006r7-I7 for 16963@debbugs.gnu.org; Thu, 27 Jun 2019 23:30:43 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5S3U2sS008324; Fri, 28 Jun 2019 03:30:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=6dECrnEp3MElMZUCIYCglp8VYo3YavqkrpM7Cvm2Cxk=; b=j2AgX95JgBV1DkJPGi5YuEqapqGxrg/ugxFvtK0Uid+uquZJ0eGSzNyQ/+9w879Wmv1I m2rNnhpoppSJEhzUpqLU2Jux1cpRxnNmJCSTriu2F9h0ZBkc0TceB7fN4nVce4BzTBsI GcB/fTvyXu+tlLeFFPxWEAQ6XRcEgyFJ8RekmUiOGehIGBTFZl5CzffpO9TFhl3g/Nmi b4h5xXqdiyyKr+h07rVTiOxn7ufwOylP7Aou0sCCNHJKyVyHf7rC6IKs46YzMmBrqnw5 4vZIbMGLImN+0KrezlfUUR39jxZ3eGSI9ZdE0SyKsggdtAMLY0xd886vpgoHXG/OSKLK xg== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 2t9cyqu8wp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 Jun 2019 03:30:33 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5S3TaWd139434; Fri, 28 Jun 2019 03:30:32 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3030.oracle.com with ESMTP id 2t9acdk81w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 Jun 2019 03:30:32 +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 x5S3USJn029453; Fri, 28 Jun 2019 03:30:28 GMT In-Reply-To: <87v9wq5rl4.fsf@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4861.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9301 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=664 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906280033 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9301 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=730 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906280033 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: 209.51.188.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:161682 Archived-At: > Oh, this reminds me I had started writing a patch for this. I used the > name cons* instead of list* though, I always found it more logical: > cons* is cons repeated, just like let* is let repeated. Let me dust it > off: The name has long been `list*' in Lisp, including in Common Lisp. That's the name that should (still) be used, IMO. http://clhs.lisp.se/Body/f_list_.htm list* is like list except that the last argument to list becomes the car of the last cons constructed, while the last argument to list* becomes the cdr of the last cons constructed. Hence, any given call to list* always produces one fewer conses than a call to list with the same number of arguments. If the last argument to list* is a list, the effect is to construct a new list which is similar, but which has additional elements added to the front corresponding to the preceding arguments of list*. If list* receives only one object, that object is returned, regardless of whether or not it is a list.