From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.bugs Subject: bug#40968: 28.0.50; (apply nil) Date: Thu, 07 May 2020 08:32:16 +1200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="124716"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Orcon Webmail Cc: Stefan Kangas , 40968@debbugs.gnu.org To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 06 22:33:46 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1jWQjh-000WKL-Ne for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 May 2020 22:33:45 +0200 Original-Received: from localhost ([::1]:39556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWQjg-00082l-Qg for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 May 2020 16:33:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWQj0-0007XV-UY for bug-gnu-emacs@gnu.org; Wed, 06 May 2020 16:33:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58010) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jWQj0-0002ii-L1 for bug-gnu-emacs@gnu.org; Wed, 06 May 2020 16:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jWQiz-0003M9-IT for bug-gnu-emacs@gnu.org; Wed, 06 May 2020 16:33:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 May 2020 20:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40968 X-GNU-PR-Package: emacs Original-Received: via spool by 40968-submit@debbugs.gnu.org id=B40968.158879714412818 (code B ref 40968); Wed, 06 May 2020 20:33:01 +0000 Original-Received: (at 40968) by debbugs.gnu.org; 6 May 2020 20:32:24 +0000 Original-Received: from localhost ([127.0.0.1]:41307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWQiN-0003Kf-Pm for submit@debbugs.gnu.org; Wed, 06 May 2020 16:32:23 -0400 Original-Received: from smtp-3.orcon.net.nz ([60.234.4.44]:36361) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWQiM-0003KX-03 for 40968@debbugs.gnu.org; Wed, 06 May 2020 16:32:22 -0400 Original-Received: from [10.253.37.70] (port=48740 helo=webmail.orcon.net.nz) by smtp-3.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1jWQiG-0007jC-DM; Thu, 07 May 2020 08:32:16 +1200 Original-Received: from ip-101-53-216-155.kinect.net.nz ([101.53.216.155]) via [10.253.37.253] by webmail.orcon.net.nz with HTTP (HTTP/1.1 POST); Thu, 07 May 2020 08:32:16 +1200 In-Reply-To: X-Sender: psainty@orcon.net.nz X-GeoIP: -- X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:179845 Archived-At: On 2020-05-06 23:49, Pip Cet wrote: > Again, I'm no longer sure what the right thing to do here is. I think > I'm up to five different interpretations of (apply ARG) here, > depending on whether ARG is interpreted as FUNCTION, the last of the > ARGUMENTS, an ARGUMENT but not the last one, or a combination thereof, > and whether ARG is required to be a list or not... To my mind the nicest change would be to handle the two error cases, and keep everything else the same. 1. (apply nil) would signal an error. 2. (apply FUNC) would be equivalent to funcall, rather than signalling an error, when (functionp FUNC) -- or perhaps just (not (consp FUNC)). 3. (apply LIST) would remain equivalent to (apply (car LIST) (cdr LIST)) I don't feel strongly about #2. It seems like a nice enhancement to me, but if others feel that would be cause problems then I wouldn't argue. Existing uses of that in the wild are obviously signalling errors at present, so offhand it doesn't seem to me like a dangerous change, and it would match the existing signature. #3 just seems like the only useful thing that apply could possibly do with a single list argument, so I'd definitely keep that. #2 and #3 are surely both convenient for generated code which doesn't know how many arguments it's going to be dealing with. I would still use (FUNCTION &optional ARGS) as the signature, and just document what happens when FUNCTION is actually a list. -Phil