GNU bug report logs - #40968
28.0.50; (apply nil)

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Pip Cet <pipcet@HIDDEN>; dated Wed, 29 Apr 2020 18:27:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 21:37:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 17:37:51 2020
Received: from localhost ([127.0.0.1]:41474 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWRji-00051n-W0
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 17:37:51 -0400
Received: from userp2130.oracle.com ([156.151.31.86]:56470)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1jWRji-00051a-35
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 17:37:50 -0400
Received: from pps.filterd (userp2130.oracle.com [127.0.0.1])
 by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046LbeOX117620;
 Wed, 6 May 2020 21:37:44 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-2020-01-29;
 bh=FOcHwtPYhfqq9pfza+O335y72pva6CJmJDbzDo3M8d0=;
 b=OWvUQuCW4ztKLWMDOb96u7xSoGoAYyyTcSGzMhvughR+fSCMsi8e9HLOZDgMsaHznVll
 HVtMwgjByt55oW0mLnVZC4IGiuuUFYLP+/0iISXH1jH2NcSYovY35ZYCpBRPLoxRD7G6
 gNrpYIsCU1f6vpn4VCSSev1gpH7B8AYM45mQlr0ofk0phvRjkwez3x+xopC2nfv8j8xl
 3hW/upFVwvl9zftmHhX7zMZhER8ROYZk1OFGpmc7H2IDHVzQEyMzh4BDSfafEVSAajtx
 kGULApLAhWuvR7mZBZVkE6N8eiVkYpZZCpmb/oK8Y0DeFCrVMTwUl9hL1xcaAjju5jEz Yw== 
Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70])
 by userp2130.oracle.com with ESMTP id 30s09rcwrh-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 06 May 2020 21:37:44 +0000
Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1])
 by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046LZckx072738;
 Wed, 6 May 2020 21:35:43 GMT
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])
 by aserp3020.oracle.com with ESMTP id 30sjnksex3-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 06 May 2020 21:35:43 +0000
Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24])
 by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 046LZgjT018106;
 Wed, 6 May 2020 21:35:42 GMT
MIME-Version: 1.0
Message-ID: <afae9654-c31e-4c7e-b4e8-da394e84a719@default>
Date: Wed, 6 May 2020 14:35:41 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Phil Sainty <psainty@HIDDEN>, Pip Cet <pipcet@HIDDEN>
Subject: RE: bug#40968: 28.0.50; (apply nil)
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
 <CAOqdjBcxGpHxSPS4rLGAbS06Q_QjUMPz1GMae+neEGENNEEHPA@HIDDEN>
 <CADwFkm=TZ6O3Wocst8E047g4VAFu3n8MaVL1ZQSEopMkxkTkfw@HIDDEN>
 <CAOqdjBc+qQaiBMK9pAZbyMZm3nhVZdF4UHE15My01ivfOZ9F0A@HIDDEN>
 <c91ab335234cca0a2614ad8e3b0c65aa@HIDDEN>
In-Reply-To: <c91ab335234cca0a2614ad8e3b0c65aa@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4993.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613
 signatures=668687
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0
 adultscore=0 phishscore=0
 mlxlogscore=966 bulkscore=0 malwarescore=0 spamscore=0 suspectscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000
 definitions=main-2005060172
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613
 signatures=668687
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0
 mlxscore=0
 lowpriorityscore=0 spamscore=0 adultscore=0 clxscore=1011 suspectscore=0
 priorityscore=1501 malwarescore=0 mlxlogscore=999 phishscore=0
 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2003020000 definitions=main-2005060173
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org, Stefan Kangas <stefan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> To my mind the nicest change would be to handle the two error cases,
> and keep everything else the same.
>=20
> 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))
>=20
> 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.
>=20
> #3 just seems like the only useful thing that apply could possibly do
> with a single list argument, so I'd definitely keep that.
>=20
> #2 and #3 are surely both convenient for generated code which doesn't
> know how many arguments it's going to be dealing with.
>=20
> I would still use (FUNCTION &optional ARGS) as the signature, and just
> document what happens when FUNCTION is actually a list.

What's wrong with doing what Common Lisp does
(apparently, per the doc'd signature)?

(apply FUNCTION first-arg &rest other-args)

The first arg to `apply' is required, and
must be a function.

The second arg to `apply' is required.
Any arg after the second is optional.

The last arg to `apply' must be a list.
(This is true even if it is the second arg.)
It can be nil.

* If the last arg is the second arg, then its
  elements are the args passed to FUNCTION.
  (If it is the empty list then FUNCTION must
  be nullary.)

* If the last arg is not the second arg, then
  its elements are the Nth args for FUNCTION,
  where N =3D 1+ the element index.  FUNCTION
  must be able to accept M args, where M =3D 1+
  the number of elements in the last arg.

"Must" means an error is raised if not so.


(apply)          =3D> error
(apply ANYTHING) =3D> error

(apply FUNCTION '(x)   ) =3D> (funcall FUNCTION x)
 ; last arg: singleton list of args

(apply FUNCTION   x  ()) =3D> (funcall FUNCTION x)
 ; first arg: x
 ; last arg: empty list of other args

(apply FUNCTION  ()    ) =3D> (funcall FUNCTION)
 ; last arg: empty list of args

(apply FUNCTION  ()  ()) =3D> (funcall FUNCTION nil)
 ; first arg nil
 ; last arg: empty list of other args




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 20:32:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 16:32:24 2020
Received: from localhost ([127.0.0.1]:41307 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWQiN-0003Kf-Pm
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 16:32:23 -0400
Received: from smtp-3.orcon.net.nz ([60.234.4.44]:36361)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <psainty@HIDDEN>) id 1jWQiM-0003KX-03
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 16:32:22 -0400
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 <psainty@HIDDEN>)
 id 1jWQiG-0007jC-DM; Thu, 07 May 2020 08:32:16 +1200
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
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Thu, 07 May 2020 08:32:16 +1200
From: Phil Sainty <psainty@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
Subject: Re: bug#40968: 28.0.50; (apply nil)
In-Reply-To: <CAOqdjBc+qQaiBMK9pAZbyMZm3nhVZdF4UHE15My01ivfOZ9F0A@HIDDEN>
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
 <CAOqdjBcxGpHxSPS4rLGAbS06Q_QjUMPz1GMae+neEGENNEEHPA@HIDDEN>
 <CADwFkm=TZ6O3Wocst8E047g4VAFu3n8MaVL1ZQSEopMkxkTkfw@HIDDEN>
 <CAOqdjBc+qQaiBMK9pAZbyMZm3nhVZdF4UHE15My01ivfOZ9F0A@HIDDEN>
Message-ID: <c91ab335234cca0a2614ad8e3b0c65aa@HIDDEN>
X-Sender: psainty@HIDDEN
User-Agent: Orcon Webmail
X-GeoIP: --
X-Spam_score: -2.9
X-Spam_score_int: -28
X-Spam_bar: --
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org, Stefan Kangas <stefan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

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





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 19:28:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 15:28:30 2020
Received: from localhost ([127.0.0.1]:41212 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWPiY-0001jx-G4
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 15:28:30 -0400
Received: from userp2120.oracle.com ([156.151.31.85]:53100)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1jWPiX-0001jj-9S
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 15:28:29 -0400
Received: from pps.filterd (userp2120.oracle.com [127.0.0.1])
 by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046JRjPJ100670;
 Wed, 6 May 2020 19:28:23 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-2020-01-29;
 bh=LhTjr9XaePT09Rp43j9YDDYYYNuawltu4JnDW7P3fHw=;
 b=XzzO5zGaxjGB5jcys3t7mqce6R8+3H8yKTmCrbob1dkrrSTOg40YsCuGq0g88k5UgyJw
 n9hCLRpyTtd9EcbIHv8xetkbzuOOEdwSgCn0YFAzIj2Rge7lmNDKao2d1Xa1EVxbOEG7
 jyX4SxQ43l8WuQrQs+6ZKPS0pLJ/ol87UgLby7+VJUTyj/QxsW/zQ/92wXCwnRHSKRxJ
 hE2jMCcybqcCn0N15UW4PqpcG9iB0s7syNbVchTTGIY7CnvpqW3/H7v7L0RJ2STmn0Vj
 uP0MlT/M4Lal4nLtOePRcmz2WTAK9QLPHWrKKRgAazCHl8KDv5kUVTHBhPdT3g9eg7g/ sg== 
Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71])
 by userp2120.oracle.com with ESMTP id 30s1gnc5kr-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 06 May 2020 19:28:23 +0000
Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1])
 by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046JQqQu179283;
 Wed, 6 May 2020 19:28:23 GMT
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])
 by aserp3030.oracle.com with ESMTP id 30sjdw6k3s-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 06 May 2020 19:28:22 +0000
Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24])
 by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 046JSMrM001954;
 Wed, 6 May 2020 19:28:22 GMT
MIME-Version: 1.0
Message-ID: <c66db244-c983-42db-9c99-7f8fdcc19018@default>
Date: Wed, 6 May 2020 12:28:21 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
Subject: RE: bug#40968: 28.0.50; (apply nil)
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
 <CAOqdjBcxGpHxSPS4rLGAbS06Q_QjUMPz1GMae+neEGENNEEHPA@HIDDEN>
 <CADwFkm=TZ6O3Wocst8E047g4VAFu3n8MaVL1ZQSEopMkxkTkfw@HIDDEN>
 <CAOqdjBc+qQaiBMK9pAZbyMZm3nhVZdF4UHE15My01ivfOZ9F0A@HIDDEN>
 <CADwFkmkJxwZcZ2LGRGe0VdEYTA3BSxse-2yRogF+ou0y0Zt1=g@HIDDEN>
 <f13f606d-558f-4493-a32d-927a17259634@default> <85a72khq90.fsf@HIDDEN>
 <b4709a3a-b0ed-4dba-b0a6-ec0f98e8bca5@default>
 <CAOqdjBf0U3mGGc_AzN0_bxxvVNBKjMw1hV-Q5KufeVs3wyJwDw@HIDDEN>
In-Reply-To: <CAOqdjBf0U3mGGc_AzN0_bxxvVNBKjMw1hV-Q5KufeVs3wyJwDw@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4993.0 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613
 signatures=668687
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
 suspectscore=0 mlxscore=0
 bulkscore=0 adultscore=0 phishscore=0 mlxlogscore=831 malwarescore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000
 definitions=main-2005060157
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613
 signatures=668687
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0
 suspectscore=0 mlxscore=0
 spamscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 phishscore=0
 impostorscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=885
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000
 definitions=main-2005060157
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org, Stefan Kangas <stefan@HIDDEN>,
 Noam Postavsky <npostavs@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> > And if Elisp follows that (which I think it should,
> > unless someone can present a good use case for just
> > (apply FUNCTION)), then it should raise an error if
> > there are not at least two args.
>=20
> Note that single-argument apply in current Elisp is not (apply
> FUNCTION) but (apply LIST-OF-FUNCTION-PLUS-ARGS).
>=20
> (apply '+) is an error.
> (apply '(+)) is 0.
>=20
> That's why the problem with (apply nil) arose.

I think (apply '(+)) should raise an error, because
(a) the first arg is not a function and (b) it's
missing a second arg.

I think (apply ()) should raise an error for the
same reason: nil is not a function, and there's no
second arg.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 19:26:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 15:26:19 2020
Received: from localhost ([127.0.0.1]:41207 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWPgR-0001gv-2B
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 15:26:19 -0400
Received: from userp2120.oracle.com ([156.151.31.85]:51098)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1jWPgP-0001gh-Kw
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 15:26:18 -0400
Received: from pps.filterd (userp2120.oracle.com [127.0.0.1])
 by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046JNqXQ082905;
 Wed, 6 May 2020 19:26:11 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-2020-01-29;
 bh=FgQkf6VMDndpNeH4DutsMw8jGozXIwEvan2xJyU1Y7M=;
 b=0cBu42rISqab/RcdfDxRCM/zQrf84i+sCpZfwDanN2A39WWaDqBdm8bO47QmIVvR5ggZ
 bd8jBCa908K8BNa1BFL+AMnzobQ8Pu2HBtvxt21JSXLdSCtsN36KvD7ENJmUU3hembzk
 hw5/b2/WBoDyrwsRIRlSwCLBXzGTPbHdgxaCactXWZKyqKreQ7lXVxoOaG9F2jYPAOhz
 l5WiP5sZSa5hr+ErLMl0ZzNoEK8HJQXYbuWbVXgJfvGtvMS+7R7HVNNshVyeY+VhWtOb
 GqcG7syjtrUe5BR603Vg5lDEy8z/cIIPjwrB96zQ+KfZ17CLq4FyycPOSZ335QVaoUXs Pg== 
Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71])
 by userp2120.oracle.com with ESMTP id 30s1gnc593-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 06 May 2020 19:26:11 +0000
Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1])
 by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046JMpvl170617;
 Wed, 6 May 2020 19:26:11 GMT
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])
 by aserp3030.oracle.com with ESMTP id 30sjdw6g2c-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 06 May 2020 19:26:11 +0000
Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24])
 by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 046JQAWF027804;
 Wed, 6 May 2020 19:26:10 GMT
MIME-Version: 1.0
Message-ID: <01f325dd-c613-492c-b2c0-affd836e01c6@default>
Date: Wed, 6 May 2020 12:26:09 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>, Stefan Kangas <stefan@HIDDEN>
Subject: RE: bug#40968: 28.0.50; (apply nil)
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
 <CAOqdjBcxGpHxSPS4rLGAbS06Q_QjUMPz1GMae+neEGENNEEHPA@HIDDEN>
 <CADwFkm=TZ6O3Wocst8E047g4VAFu3n8MaVL1ZQSEopMkxkTkfw@HIDDEN>
 <CAOqdjBc+qQaiBMK9pAZbyMZm3nhVZdF4UHE15My01ivfOZ9F0A@HIDDEN>
 <CADwFkmkJxwZcZ2LGRGe0VdEYTA3BSxse-2yRogF+ou0y0Zt1=g@HIDDEN>
 <CAOqdjBe+UiPTUSV_nC7ZLp+jNG7D6UhrrLTw60Jqn6wpCpMYKg@HIDDEN>
 <CADwFkmmwcunMQG12Rt_pG3ztCOjxWRj5MtcvP4TWVU1Hoq4gAw@HIDDEN>
 <CAOqdjBdRcpXss0ZR+uNOAoRSh8nzONXLcjMFE1xeeuWxobrjUQ@HIDDEN>
In-Reply-To: <CAOqdjBdRcpXss0ZR+uNOAoRSh8nzONXLcjMFE1xeeuWxobrjUQ@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4993.0 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613
 signatures=668687
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
 suspectscore=0 mlxscore=0
 bulkscore=0 adultscore=0 phishscore=0 mlxlogscore=999 malwarescore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000
 definitions=main-2005060156
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613
 signatures=668687
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0
 suspectscore=0 mlxscore=0
 spamscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 phishscore=0
 impostorscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=999
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000
 definitions=main-2005060156
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> > > Is the function signature relevant for anything but eldoc?

It should be relevant in terms of raising an error
if the signature is not respected.

> > Besides the docstring, the manual documents it.  The suggested form
> > is unusual and makes it harder to understand, IMHO.
>=20
> I think it's hard to understand Elisp apply from a standard signature,
> because it's really
>=20
> (apply FUNCTION &rest INDIVIDUAL-ARGUMENTS ARGUMENT-LIST)
> or
> (apply FUNCTION-AND-ARGUMENT-LIST)
>=20
> The latter (which takes a single argument) is not a special case of
> the former (which takes 2,3,4,... arguments).

(apply FUNCTION) and (apply) should raise an
error, IMO (as in Common Lisp).

Is there a good use case for either?

> > If I understand correctly, you propose a three argument form:
> >     (apply FUNCTION ARGUMENT &rest ARGUMENTS)
>=20
> That's a 2,3,4...-argument form.

It's what Common Lisp prescribes.

> > This is what I find unusual.  It should really be either
> >    (apply FUNCTION &rest ARGUMENTS)
> > or (apply FUNCTION ARGUMENTS)
>=20
> That's a 2-argument form.

That second form is the same as (apply FUNCTION ARGUMENT).
And in that second form it's fine for ARGUMENT to be nil.

The first form should raise an error if ARGUMENTS is nil.

> > Maybe there's a case to be made for a syntactic alternative to
> > "&rest" which disallows nil, which I guess is the issue here?

An &rest which must not be nil is written as:

 ARGUMENT &rest MORE-ARGS

&rest is just a list.  It can always be nil.

> > My point is mainly that it has two arguments: f and args.
>=20
> I think we're all in agreement about 2-argument apply.
> 3,4,...-argument apply is an unfortunate legacy but one we're stuck
> with now. 1-argument apply is the issue here.

I'm not in agreement, FWIW.  The behavior and its
description should be as for Common Lisp: require
at least 2 args: FUNCTION and its first ARGUMENT.

Is there some use case for (apply f) and (apply)?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 19:22:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 15:22:38 2020
Received: from localhost ([127.0.0.1]:41196 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWPcs-0001at-DO
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 15:22:38 -0400
Received: from mail-oi1-f170.google.com ([209.85.167.170]:39317)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jWPcq-0001ad-18
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 15:22:36 -0400
Received: by mail-oi1-f170.google.com with SMTP id b18so2798376oic.6
 for <40968 <at> debbugs.gnu.org>; Wed, 06 May 2020 12:22:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=MtwOr5PDmqk1FeW4N0XjfgTd/YrsUMYVQetdFOY3edw=;
 b=LNsSUQyAp+88e8I0f2M3kblD0QTYJwkepkhDJ/O9JUxity/FLgldMVBHs+StaV7/Jh
 xDiCz0fHINfZLfNhTqMLbfyZGU4lMiWVhibcDGYZi3fitU+piW6/rMN7qPqs5HY51GZp
 aeXKXlL/lzUSJBMrecdxXGPsTFGWkB0NxBbxFbewW4cSWQbHvGFeYefTJDkmqu7SjKnZ
 HMG8IDGpHI8TDY0XPpo3oS1q2naVnhQJ7yBJ50xLD2hnRPLeNv0I3i4suIqCqkxQephk
 gU2/EomTPXmUzIA4PpL8sG/TkuHh6c21CsDa5mEZiKDj9x+zBvXI2hKKAgo2v1CEuaLt
 TtXA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=MtwOr5PDmqk1FeW4N0XjfgTd/YrsUMYVQetdFOY3edw=;
 b=ioxKU5WkUw5LxplYMC7F7PlzuDP3JmdHclCoA/uW0ClyUIVyQWG7vvg9GOQRWdKD4X
 UnO9b0gBA0Cip+A4YjQcWg9FOwWepwsSiDWWUxiPOgcFrw0Cr7AqiBXdW7isgecLIil4
 SGIXXEOeBbKOuif0qXSICWEMSdwf2cg0feWckbxvyYEIhSN4C4zM7DB9281zpWOAdsah
 saDrX/v0jHKlPvZbTqs6jESxYudIGG6pbF+D+bwaKxMYrIDVvVR13wQdCW4nCXH4Fg0X
 TQb208dVgXMOZukXqOf45B6RKCl4trtpT9S1CYhcDUTxfWmBM7fJbmJHSNyMtNa1JgDn
 D3Nw==
X-Gm-Message-State: AGi0PuZ33OajXS17a4JwrWn8XUMUSCOLNXKxRdNYvxVrzrRq6ExJhUEY
 a1hTAGE/FxtWDVlnnMezmTqfUufD0Jfr66Y2cb0=
X-Google-Smtp-Source: APiQypKWpB7NJxkD8CLmCdwvw89PGRhiUZkztV63tPD76S7ikYi0EMoRS7cngfL6Ke6+5xmqxNUBB35exYjVW/GUcPE=
X-Received: by 2002:aca:6705:: with SMTP id z5mr3741428oix.122.1588792950449; 
 Wed, 06 May 2020 12:22:30 -0700 (PDT)
MIME-Version: 1.0
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
 <CAOqdjBcxGpHxSPS4rLGAbS06Q_QjUMPz1GMae+neEGENNEEHPA@HIDDEN>
 <CADwFkm=TZ6O3Wocst8E047g4VAFu3n8MaVL1ZQSEopMkxkTkfw@HIDDEN>
 <CAOqdjBc+qQaiBMK9pAZbyMZm3nhVZdF4UHE15My01ivfOZ9F0A@HIDDEN>
 <CADwFkmkJxwZcZ2LGRGe0VdEYTA3BSxse-2yRogF+ou0y0Zt1=g@HIDDEN>
 <f13f606d-558f-4493-a32d-927a17259634@default> <85a72khq90.fsf@HIDDEN>
 <b4709a3a-b0ed-4dba-b0a6-ec0f98e8bca5@default>
In-Reply-To: <b4709a3a-b0ed-4dba-b0a6-ec0f98e8bca5@default>
From: Pip Cet <pipcet@HIDDEN>
Date: Wed, 6 May 2020 19:21:54 +0000
Message-ID: <CAOqdjBf0U3mGGc_AzN0_bxxvVNBKjMw1hV-Q5KufeVs3wyJwDw@HIDDEN>
Subject: Re: bug#40968: 28.0.50; (apply nil)
To: Drew Adams <drew.adams@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org, Stefan Kangas <stefan@HIDDEN>,
 Noam Postavsky <npostavs@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Wed, May 6, 2020 at 7:17 PM Drew Adams <drew.adams@HIDDEN> wrote:
> And if Elisp follows that (which I think it should,
> unless someone can present a good use case for just
> (apply FUNCTION)), then it should raise an error if
> there are not at least two args.

Note that single-argument apply in current Elisp is not (apply
FUNCTION) but (apply LIST-OF-FUNCTION-PLUS-ARGS).

(apply '+) is an error.
(apply '(+)) is 0.

That's why the problem with (apply nil) arose.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 19:17:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 15:17:38 2020
Received: from localhost ([127.0.0.1]:41191 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWPY1-0001T5-Oz
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 15:17:38 -0400
Received: from userp2120.oracle.com ([156.151.31.85]:43682)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1jWPXu-0001Sl-Uk
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 15:17:35 -0400
Received: from pps.filterd (userp2120.oracle.com [127.0.0.1])
 by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046JDjIX074033;
 Wed, 6 May 2020 19:17:24 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-2020-01-29;
 bh=UfwNgXjMI8Ng2hPyvYXMPMNhXfFyUIJJirL/aNz3ELI=;
 b=Y/kJXjMOIsyRSdTiCgZdfqswwP12VGQoHCesPHdN2aD//uJI27AA0q4kqG9nFsptOaK3
 bmhPIgUkZCMHnvCOLjDQK5jNaD20lxH4CANfcEjKsG0QAG5mRSVB9z+Svl2Zl/7RGffN
 WJpGeFPtA9L7YIkPdgZCUXbw5jG6nwZqMvfru6Qmkr66XTgDVGsePDUBHLFjo9cX3iOT
 ++yDDu58fI3TsZ1GxSvwjzTJO4xmaBbVk+unHliti5Zbyb2oJhGVE1U1V9RpFqULDy05
 hO02y9wKMEZ+ta2A6APDGFJrZPuGxwFPVTlV8gI20Fv91vR6EsflYF5JfeqcL4xNnnON Fg== 
Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79])
 by userp2120.oracle.com with ESMTP id 30s1gnc447-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 06 May 2020 19:17:24 +0000
Received: from pps.filterd (userp3020.oracle.com [127.0.0.1])
 by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046JChDe140937;
 Wed, 6 May 2020 19:17:23 GMT
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])
 by userp3020.oracle.com with ESMTP id 30us7ne6wf-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 06 May 2020 19:17:23 +0000
Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24])
 by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 046JHMHB025516;
 Wed, 6 May 2020 19:17:22 GMT
MIME-Version: 1.0
Message-ID: <b4709a3a-b0ed-4dba-b0a6-ec0f98e8bca5@default>
Date: Wed, 6 May 2020 12:17:21 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
Subject: RE: bug#40968: 28.0.50; (apply nil)
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
 <CAOqdjBcxGpHxSPS4rLGAbS06Q_QjUMPz1GMae+neEGENNEEHPA@HIDDEN>
 <CADwFkm=TZ6O3Wocst8E047g4VAFu3n8MaVL1ZQSEopMkxkTkfw@HIDDEN>
 <CAOqdjBc+qQaiBMK9pAZbyMZm3nhVZdF4UHE15My01ivfOZ9F0A@HIDDEN>
 <CADwFkmkJxwZcZ2LGRGe0VdEYTA3BSxse-2yRogF+ou0y0Zt1=g@HIDDEN>
 <f13f606d-558f-4493-a32d-927a17259634@default> <85a72khq90.fsf@HIDDEN>
In-Reply-To: <85a72khq90.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4993.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613
 signatures=668687
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0
 adultscore=0 suspectscore=0
 mlxlogscore=999 malwarescore=0 phishscore=0 mlxscore=0 spamscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000
 definitions=main-2005060155
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613
 signatures=668687
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0
 suspectscore=0 mlxscore=0
 spamscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 phishscore=0
 impostorscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=999
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000
 definitions=main-2005060155
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org, Stefan Kangas <stefan@HIDDEN>,
 Pip Cet <pipcet@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> >  apply function arg &rest more-args
> >                 ^^^
> >
> https://urldefense.com/v3/__https://www.cs.cmu.edu/Groups/AI/html/cltl/
> clm/node81.html__;!!GqivPVa7Brio!Kes9zsDqvdTyifr0LvhIg-
> x3qHNl3XPQZaBRBxbjXsP-qGz7ieoaYPp6rfGGzbvg$
> >
> > On the other hand the CL HyperSpec agrees with you:
> >
> >  apply function &rest args+ =3D> result*
> >
> https://urldefense.com/v3/__http://www.lispworks.com/documentation/Hype
> rSpec/Body/f_apply.htm__;!!GqivPVa7Brio!Kes9zsDqvdTyifr0LvhIg-
> x3qHNl3XPQZaBRBxbjXsP-qGz7ieoaYPp6rY83YOj5$
>=20
> I think '&rest args+' is just BNF shorthand for 'arg &rest more-args'
> (i.e., both signatures above require a total of 2 or more arguments).
>=20
> https://urldefense.com/v3/__http://www.lispworks.com/documentation/Hype
> rSpec/Body/01_dab.htm__;!!GqivPVa7Brio!Kes9zsDqvdTyifr0LvhIg-
> x3qHNl3XPQZaBRBxbjXsP-qGz7ieoaYPp6rbGmUXoP$

Ah yes; thanks.

So Common Lisp is unequivocally in the camp of
requiring at least two args.

And if Elisp follows that (which I think it should,
unless someone can present a good use case for just
(apply FUNCTION)), then it should raise an error if
there are not at least two args.

Just one opinion.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 18:42:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 14:42:47 2020
Received: from localhost ([127.0.0.1]:41170 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWP0J-0000b2-Jt
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 14:42:47 -0400
Received: from mail83c50.megamailservers.eu ([91.136.10.93]:50850
 helo=mail18c50.megamailservers.eu)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattiase@HIDDEN>) id 1jWP0F-0000ao-QY
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 14:42:46 -0400
X-Authenticated-User: mattiase@HIDDEN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu;
 s=maildub; t=1588790558;
 bh=qiTwpwU1a5a+o0fN6Y5OIXqV4wmXsS4uJyf2kSa3XJ0=;
 h=From:Subject:Date:Cc:To:From;
 b=lbbWxbtKh6sRdLEF+NyhB8WpwxadpNq+mbM0LUC9kzJRVYooxHPOHb25ony0lZlmq
 btvzc+0wh55axmJZO5awbM8pI8LX2tZ4xQ2B3FfiB1IaZeDZlnHGEEZI3k1B01rAb0
 Cd2BiAO6m+y5cmoCc7V7QnCM4aXiSbWDtxxo7bos=
Feedback-ID: mattiase@HIDDEN
Received: from stanniol.lan (c-4e4ae655.032-75-73746f71.bbcust.telenor.se
 [85.230.74.78]) (authenticated bits=0)
 by mail18c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 046IgZXk009332; 
 Wed, 6 May 2020 18:42:36 +0000
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>
Content-Type: multipart/mixed;
 boundary="Apple-Mail=_53712A38-29AF-4BD9-A414-8027B7F4AB1F"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\))
Subject: Re: bug#40968: 28.0.50; (apply nil) 
Message-Id: <CC40D602-5027-40A7-9BAB-1AADC9E4BDAE@HIDDEN>
Date: Wed, 6 May 2020 20:42:34 +0200
To: Pip Cet <pipcet@HIDDEN>
X-Mailer: Apple Mail (2.3445.104.14)
X-CTCH-RefID: str=0001.0A782F23.5EB304D5.0030, ss=1, re=0.000, recu=0.000,
 reip=0.000, cl=1, cld=1, fgs=0
X-CTCH-VOD: Unknown
X-CTCH-Spam: Unknown
X-CTCH-Score: 0.000
X-CTCH-Rules: 
X-CTCH-Flags: 0
X-CTCH-ScoreCust: 0.000
X-CSC: 0
X-CHA: v=2.3 cv=K8Zc4BeI c=1 sm=1 tr=0 a=klNLuyVZdLUgl+K5Uafb2A==:117
 a=klNLuyVZdLUgl+K5Uafb2A==:17 a=M51BFTxLslgA:10 a=FyimMvxhTKJVWkl6uL8A:9
 a=CjuIK1q_8ugA:10 a=DnGgYRmb9dQCi2FSDzUA:9 a=De_Ol2h6w80A:10
X-Spam-Score: 1.4 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  That patch is fine but perhaps incomplete, if we want (apply
 nil) to result in the same error when interpreted and byte-compiled. Suggested
 test case attached. The manual change is fine. Perhaps we should adopt a
 somewhat discouraging tone. You could also say that (apply X) is defined as
 (apply (car X) (cdr X)), and X must be a cons. 
 Content analysis details:   (1.4 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: megamailservers.eu]
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.4 KHOP_HELO_FCRDNS       Relay HELO differs from its IP's reverse DNS
X-Debbugs-Envelope-To: 40968
Cc: Stefan Kangas <stefan@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 40968 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)


--Apple-Mail=_53712A38-29AF-4BD9-A414-8027B7F4AB1F
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

That patch is fine but perhaps incomplete, if we want (apply nil) to =
result in the same error when interpreted and byte-compiled.
Suggested test case attached.

The manual change is fine. Perhaps we should adopt a somewhat =
discouraging tone.
You could also say that (apply X) is defined as (apply (car X) (cdr X)), =
and X must be a cons.



--Apple-Mail=_53712A38-29AF-4BD9-A414-8027B7F4AB1F
Content-Disposition: attachment;
	filename=test.diff
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="test.diff"
Content-Transfer-Encoding: 7bit

diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el
index bfe2d06a61..65fd57b4e0 100644
--- a/test/lisp/emacs-lisp/bytecomp-tests.el
+++ b/test/lisp/emacs-lisp/bytecomp-tests.el
@@ -352,7 +352,14 @@ byte-opt-testsuite-arith-data
     ;; `substring' bytecode generation (bug#39709).
     (substring "abcdef")
     (substring "abcdef" 2)
-    (substring "abcdef" 3 2))
+    (substring "abcdef" 3 2)
+
+    ;; `apply' with single argument (bug#40968).
+    (apply '(+ 2 3 5))
+    (condition-case nil
+        (apply nil)
+      (wrong-type-argument 'wrong-arg))
+    )
   "List of expression for test.
 Each element will be executed by interpreter and with
 bytecompiled code, and their results compared.")

--Apple-Mail=_53712A38-29AF-4BD9-A414-8027B7F4AB1F--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 18:28:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 14:28:53 2020
Received: from localhost ([127.0.0.1]:41165 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWOmr-0000FC-CG
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 14:28:53 -0400
Received: from mail-qt1-f181.google.com ([209.85.160.181]:39238)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1jWOmp-0000Ex-2g
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 14:28:52 -0400
Received: by mail-qt1-f181.google.com with SMTP id o10so2340527qtr.6
 for <40968 <at> debbugs.gnu.org>; Wed, 06 May 2020 11:28:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=EuBKWM2S3n7xmTCoxJ0chxqHoeXijF6ZNpRO/DNbumg=;
 b=tl0jsyAGwYS4ffmmK8PtBXpv9fwBSS9hihbFVjcHMkd5yXZSnlF8Z/P3HLMdBDgIUQ
 P6LjvBXshICAUmtT0QOXm45UG5weRAqJ+cZz9s9q2yyVX0AIVHkyykj28tYwbzw7sJtb
 UKnTcQJj4XX2jWQAbqNLW+NIZymSb62Ovqv02s8e7l+AlvCxqFVyhGng/kcEPf7OK9cf
 KWamJZctCr7QfjJYLPwkj9RtKGNgnO0TSbAI4uJqvF2KuXwNkrb6Xks0MgzdY39AT3FE
 6mUXoebvXR5v+Wi96ZsFLXf3SQSN17b4x5p1PSpxa6U4fxlDzQo0DxlRwUexXfeNNiNE
 k/Jg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=EuBKWM2S3n7xmTCoxJ0chxqHoeXijF6ZNpRO/DNbumg=;
 b=LmivPogmYVSfcbEbEsT81fcyqAyzsyDDsJCE06VYPcGVmC9D7N9Gv4R6RNIhzybUbj
 ofw8r1s80qZ4qWTzbNzrVlzE1ZURl/+SZRKBlUm6rVelpWp/h4O0xhrpOXqInMex6AUl
 DJq4FPYObkGpq34414scyk2uVET5qVsOPm6Uaabb9HEm3QmXORkl6z9cooW5qnJ09RO4
 JTCD0CSCyGFnon7frBPQQz3hZJaknuo+gaY7DHSfvu8Pk7TLuRzW6HUsP/uWNJKaxLCt
 DZHpOyCX/wrSe+r9tvJm3ImvBSAB/NKZKlko4HCkWVIs+8iqeJB8qV8Lo7pHvwoM7HPj
 ybLA==
X-Gm-Message-State: AGi0Puaz5rBKO3xeHH6Bgs7HJKAJyQW0sHbBHokss9Pi4ObOn1SANhoo
 nfZ1b9CQC8oXLWDlDHpTOUmW25EO
X-Google-Smtp-Source: APiQypLbcexH5JpX/S6k1js9fjUY5pLvbfvRL/L4STPRNtR2Sbzzvh6HoBcOC+Vr+p13Z/YxGa9KAQ==
X-Received: by 2002:ac8:2c0c:: with SMTP id d12mr9821060qta.284.1588789725269; 
 Wed, 06 May 2020 11:28:45 -0700 (PDT)
Received: from vhost2
 (CPE001143542e1f-CMf81d0f809fa0.cpe.net.cable.rogers.com. [99.230.38.42])
 by smtp.gmail.com with ESMTPSA id b136sm2280822qkg.86.2020.05.06.11.28.44
 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 06 May 2020 11:28:44 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: bug#40968: 28.0.50; (apply nil)
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
 <CAOqdjBcxGpHxSPS4rLGAbS06Q_QjUMPz1GMae+neEGENNEEHPA@HIDDEN>
 <CADwFkm=TZ6O3Wocst8E047g4VAFu3n8MaVL1ZQSEopMkxkTkfw@HIDDEN>
 <CAOqdjBc+qQaiBMK9pAZbyMZm3nhVZdF4UHE15My01ivfOZ9F0A@HIDDEN>
 <CADwFkmkJxwZcZ2LGRGe0VdEYTA3BSxse-2yRogF+ou0y0Zt1=g@HIDDEN>
 <f13f606d-558f-4493-a32d-927a17259634@default>
Date: Wed, 06 May 2020 14:28:43 -0400
In-Reply-To: <f13f606d-558f-4493-a32d-927a17259634@default> (Drew Adams's
 message of "Wed, 6 May 2020 11:00:30 -0700 (PDT)")
Message-ID: <85a72khq90.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org, Stefan Kangas <stefan@HIDDEN>,
 Pip Cet <pipcet@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Drew Adams <drew.adams@HIDDEN> writes:

>  apply function arg &rest more-args
>                 ^^^
>
> https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node81.html
>
> On the other hand the CL HyperSpec agrees with you:
>
>  apply function &rest args+ => result*
>
> http://www.lispworks.com/documentation/HyperSpec/Body/f_apply.htm

I think '&rest args+' is just BNF shorthand for 'arg &rest more-args'
(i.e., both signatures above require a total of 2 or more arguments).

http://www.lispworks.com/documentation/HyperSpec/Body/01_dab.htm




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 18:09:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 14:09:31 2020
Received: from localhost ([127.0.0.1]:41160 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWOU7-0008Cq-Om
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 14:09:31 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52392)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jWOU6-0008Cd-VB
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 14:09:31 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:60550)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jWOU1-0002HA-NZ; Wed, 06 May 2020 14:09:25 -0400
Received: from [176.228.60.248] (port=2663 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jWOU1-0005vi-1w; Wed, 06 May 2020 14:09:25 -0400
Date: Wed, 06 May 2020 21:09:08 +0300
Message-Id: <83bln1kkaj.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
In-Reply-To: <CAOqdjBc2+_mMt5sn3MvFvKq8yeQcbuu5=6pTvNbiPA3CPO1d2w@HIDDEN>
 (message from Pip Cet on Wed, 6 May 2020 17:54:23 +0000)
Subject: Re: bug#40968: 28.0.50; (apply nil)
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
 <CAOqdjBcxGpHxSPS4rLGAbS06Q_QjUMPz1GMae+neEGENNEEHPA@HIDDEN>
 <CADwFkm=TZ6O3Wocst8E047g4VAFu3n8MaVL1ZQSEopMkxkTkfw@HIDDEN>
 <CAOqdjBc+qQaiBMK9pAZbyMZm3nhVZdF4UHE15My01ivfOZ9F0A@HIDDEN>
 <CADwFkmkJxwZcZ2LGRGe0VdEYTA3BSxse-2yRogF+ou0y0Zt1=g@HIDDEN>
 <83lfm5kvn4.fsf@HIDDEN>
 <CAOqdjBc2+_mMt5sn3MvFvKq8yeQcbuu5=6pTvNbiPA3CPO1d2w@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org, stefan@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Pip Cet <pipcet@HIDDEN>
> Date: Wed, 6 May 2020 17:54:23 +0000
> Cc: Stefan Kangas <stefan@HIDDEN>, 40968 <at> debbugs.gnu.org
> 
> > Can we instead identify the problematic usage and signal an error?
> 
> Yes. What we also have to do is fix the documentation, and fix the
> byte optimizer.
> 
> Here's a first suggestion. I'd particularly appreciate hints on better
> wording for the documentation.

The documentation parts of the patch look fine to me, thanks.  (The
rest also looks fine.)  Let's wait for a few days so others could
comment.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 18:07:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 14:07:15 2020
Received: from localhost ([127.0.0.1]:41156 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWORv-00089g-Ab
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 14:07:15 -0400
Received: from mail-ot1-f44.google.com ([209.85.210.44]:45719)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jWORt-00089S-2q
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 14:07:14 -0400
Received: by mail-ot1-f44.google.com with SMTP id e20so2112634otk.12
 for <40968 <at> debbugs.gnu.org>; Wed, 06 May 2020 11:07:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=TqFecTA+r24vCr1dNBMw6erqiw+ipFF47fdvp/R13u0=;
 b=dv+A/vdjs0T4cDi5NQ7XnTWNyLBobvw3K6gJPrd6cZXz0rxNPjhWKq+duFPBZ9YABZ
 3EHbvLcsIV8BpMjDFt4+2F2Ml6UwpNs/e7AWTdR9YJ1gAA5RXxF3eyQfxlKTY9FnmDTb
 TFv20V/4WERQRzuogyftGEOB8bMP9HfWTaHW41G1Z6XDtKMq9E7lfRKjwpIyjtTpmC8o
 SPFa8XOObCFFNwa8mIiVzKbXba4Mmplr4H9VkX+pODZcaeVB7B0d/G6Ot8JHmwXHdwH1
 hRWriMix9VJjcFw4u3mBfFVn+Yh68fr2yY+TpFbiKJfN6xYANgUpMmUpEt9+dmKy7VGK
 PgDA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=TqFecTA+r24vCr1dNBMw6erqiw+ipFF47fdvp/R13u0=;
 b=U+wwI8QD95yginxT0kiMTQF4JWQy6pl/d3hXdsge3UDeBYps85kihJY15kmIF01I85
 9j3kO8YQCh/Ok5IOoaqTfiaHLY4bMUCawpRxrBc3I0S9j741U+VwvzA7Ql0Hc3ZdE179
 lYDCs5dMDPXG2N5ogmG836FEWrgbGoq/9R5P8BqDK46fkogVC+ihohffw3/4LfmTF5ic
 rccYk5oEH+S8YmjHn+0Qw5QvV1KHhGTKxjWDZgYqJ43f8Wx0sIoIW9CB6L5q4N7/X0fB
 QA40kTQ4rkLmfmtptoxuNok8yPcU+ddcxvJ5TjJYihGVPVco52VB0Hhf++NdlVjA8AVf
 QzdA==
X-Gm-Message-State: AGi0Puaq8igzIxxfLdDBh/KDiQZMvyNG7cSvb0AS3AuXIF3hzQOp8obR
 BkcYznoycqFEJP3Ijo3qnIvP0xoCzTXHL9Y3cHU=
X-Google-Smtp-Source: APiQypKCN1LRx5MhvMFYe6laAChyzYMQBlV38lM6FdVN9P1/HhL+70CuoojPGVdTTOUJJhH+1Njimr55nvDOzmZ0LEo=
X-Received: by 2002:a9d:6b98:: with SMTP id b24mr7391337otq.287.1588788427453; 
 Wed, 06 May 2020 11:07:07 -0700 (PDT)
MIME-Version: 1.0
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
 <CAOqdjBcxGpHxSPS4rLGAbS06Q_QjUMPz1GMae+neEGENNEEHPA@HIDDEN>
 <CADwFkm=TZ6O3Wocst8E047g4VAFu3n8MaVL1ZQSEopMkxkTkfw@HIDDEN>
 <CAOqdjBc+qQaiBMK9pAZbyMZm3nhVZdF4UHE15My01ivfOZ9F0A@HIDDEN>
 <CADwFkmkJxwZcZ2LGRGe0VdEYTA3BSxse-2yRogF+ou0y0Zt1=g@HIDDEN>
 <CAOqdjBe+UiPTUSV_nC7ZLp+jNG7D6UhrrLTw60Jqn6wpCpMYKg@HIDDEN>
 <CADwFkmmwcunMQG12Rt_pG3ztCOjxWRj5MtcvP4TWVU1Hoq4gAw@HIDDEN>
In-Reply-To: <CADwFkmmwcunMQG12Rt_pG3ztCOjxWRj5MtcvP4TWVU1Hoq4gAw@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Wed, 6 May 2020 18:06:31 +0000
Message-ID: <CAOqdjBdRcpXss0ZR+uNOAoRSh8nzONXLcjMFE1xeeuWxobrjUQ@HIDDEN>
Subject: Re: bug#40968: 28.0.50; (apply nil)
To: Stefan Kangas <stefan@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Wed, May 6, 2020 at 3:28 PM Stefan Kangas <stefan@HIDDEN> wrote:
> Pip Cet <pipcet@HIDDEN> writes:
> > Is the function signature relevant for anything but eldoc?
>
> Besides the docstring, the manual documents it.  The suggested form is
> unusual and makes it harder to understand, IMHO.

I think it's hard to understand Elisp apply from a standard signature,
because it's really

(apply FUNCTION &rest INDIVIDUAL-ARGUMENTS ARGUMENT-LIST)

or

(apply FUNCTION-AND-ARGUMENT-LIST)

The latter (which takes a single argument) is not a special case of
the former (which takes 2,3,4,... arguments).

> >> apply is fundamental to Lisp, and has been defined like this for a
> >> long time.
> >
> > I don't know about that. Anything but the two-argument form of apply
> > strikes me as rather dialect-dependent, but I may be wrong.
>
> If I understand correctly, you propose a three argument form:
>
>     (apply FUNCTION ARGUMENT &rest ARGUMENTS)

That's a 2,3,4...-argument form.

> This is what I find unusual.  It should really be either
>
>     (apply FUNCTION &rest ARGUMENTS)

That's a 1,2,3...-argument form.

> or
>
>     (apply FUNCTION ARGUMENTS)

That's a 2-argument form.

> But since we already have the former, we are better to stick with
> that.
>
> Maybe there's a case to be made for a syntactic alternative to "&rest"
> which disallows nil, which I guess is the issue here?  But we can also
> just signal an error in this case.
>
> Racket does the latter, as one data point:
>
>     > (define foo (lambda () 1))
>     > (apply foo nil)
>     ; nil: undefined;
>     ;  cannot reference an identifier before its definition
>     ;   in module: top-level
>     ; [,bt for context]

Doesn't that just say that "nil" isn't a valid Racket identifier?
(apply foo '()) works fine, and Racket's apply requires at least two
arguments if I'm reading the error message correctly.

> BTW, I don't see a big difference conceptually between '&rest
> ARGUMENTS' and 'ARGUMENTS'.  The former is just syntactic sugar,
> right?

Not really, no.

> >> See the definition of "The Universal S-Function apply" in
> >> John McCarthy's paper: [1]
> >>
> >>     apply[f;args] =eval[cons[f;appq[args]];NIL],
> >
> > I must admit I don't know how appq is defined.

(It turns out my PDF viewer just refused to highlight the definition
right there on the page).

> My point is mainly that it has two arguments: f and args.

I think we're all in agreement about 2-argument apply.
3,4,...-argument apply is an unfortunate legacy but one we're stuck
with now. 1-argument apply is the issue here.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 18:02:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 14:02:42 2020
Received: from localhost ([127.0.0.1]:41152 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWONW-000832-Lk
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 14:02:42 -0400
Received: from aserp2120.oracle.com ([141.146.126.78]:33080)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1jWONU-00082p-Ir
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 14:02:41 -0400
Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1])
 by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046HxCMW134732;
 Wed, 6 May 2020 18:02: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-2020-01-29;
 bh=3OTRXy8bkNOnviyIEstWeMp2Mo2U4MxjUL8ymWiZoOc=;
 b=dLTxypbEc3gg26vPazP8+oUeYADZbo5pEtbkKMdu2RsH9nqW3xRdyFwO7FDQfixU36vz
 Gfn4kwhKipM1YIc54JkpDwTgI6Vs0m8eAxk+/LIwv/jk11Ofw15LkmMzqmF70LxcaxtQ
 HXu+Mdv3R/5eAH6nBwgdxnUQ1gP/vQTseyAMS6+dat3wyl0pXaOXuAGb0Va6LiE7pEYw
 xEtPB53f6q37fZXVhMz1pQqniJv7HuZSJ13S4nOYAHczE78cdc+u+W6dyw/QJo3BXB0O
 Fk6L2WlTv8IYX4lRbG7QGBHlIYbH2pcCuH2wSLtR36+qR+oLqCbI0Ecv6ZvzS9zDvvzi Jg== 
Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79])
 by aserp2120.oracle.com with ESMTP id 30usgq30vy-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 06 May 2020 18:02:33 +0000
Received: from pps.filterd (userp3020.oracle.com [127.0.0.1])
 by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046HufE2005755;
 Wed, 6 May 2020 18:00:32 GMT
Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72])
 by userp3020.oracle.com with ESMTP id 30us7n97ep-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 06 May 2020 18:00:31 +0000
Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24])
 by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 046I0UJA011663;
 Wed, 6 May 2020 18:00:31 GMT
MIME-Version: 1.0
Message-ID: <f13f606d-558f-4493-a32d-927a17259634@default>
Date: Wed, 6 May 2020 11:00:30 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Stefan Kangas <stefan@HIDDEN>, Pip Cet <pipcet@HIDDEN>
Subject: RE: bug#40968: 28.0.50; (apply nil)
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
 <CAOqdjBcxGpHxSPS4rLGAbS06Q_QjUMPz1GMae+neEGENNEEHPA@HIDDEN>
 <CADwFkm=TZ6O3Wocst8E047g4VAFu3n8MaVL1ZQSEopMkxkTkfw@HIDDEN>
 <CAOqdjBc+qQaiBMK9pAZbyMZm3nhVZdF4UHE15My01ivfOZ9F0A@HIDDEN>
 <CADwFkmkJxwZcZ2LGRGe0VdEYTA3BSxse-2yRogF+ou0y0Zt1=g@HIDDEN>
In-Reply-To: <CADwFkmkJxwZcZ2LGRGe0VdEYTA3BSxse-2yRogF+ou0y0Zt1=g@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4993.0 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613
 signatures=668687
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0
 adultscore=0 suspectscore=0
 mlxlogscore=999 malwarescore=0 phishscore=0 mlxscore=0 spamscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000
 definitions=main-2005060146
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613
 signatures=668687
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 impostorscore=0
 mlxscore=0
 priorityscore=1501 lowpriorityscore=0 malwarescore=0 clxscore=1015
 mlxlogscore=999 spamscore=0 adultscore=0 bulkscore=0 phishscore=0
 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2003020000 definitions=main-2005060146
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> > (apply FUNCTION ARGUMENT &rest ARGUMENTS), I guess. I missed it in
> > the first patch.
>=20
> FWIW, I still think we should avoid changing the function signature if
> at all possible.
>=20
> apply is fundamental to Lisp, and has been defined like this for a
> long time.  See the definition of "The Universal S-Function apply" in
> John McCarthy's paper: [1]
>=20
>     apply[f;args] =3Deval[cons[f;appq[args]];NIL],
>=20
> Also note that it is still defined like this elsewhere:
>=20
> Scheme: (apply function argument-list)
> Common Lisp: apply function &rest args+ =3D> result*
> Clojure: (apply f args)

Hm.  CLTL2 shows the signature for Common Lisp as this:

 apply function arg &rest more-args
                ^^^

https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node81.html

On the other hand the CL HyperSpec agrees with you:

 apply function &rest args+ =3D> result*

http://www.lispworks.com/documentation/HyperSpec/Body/f_apply.htm

Dunno what the truth is.  I've always considered
CLTL the language spec.  But that may be wrong.

What's the use case for (apply FUN)?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 17:55:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 13:55:14 2020
Received: from localhost ([127.0.0.1]:41136 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWOGI-0007q0-Aw
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 13:55:14 -0400
Received: from mail-ot1-f45.google.com ([209.85.210.45]:33887)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jWOGA-0007pH-AK
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 13:55:12 -0400
Received: by mail-ot1-f45.google.com with SMTP id 72so2112568otu.1
 for <40968 <at> debbugs.gnu.org>; Wed, 06 May 2020 10:55:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=gLf1swf4ZJXXJhGaHoYxaT5V6VsJEBd3ddnRWReokcA=;
 b=HF7g396K1bOZlbWusoyZzohb2Jq3Y68krH7LAlXwVrN4k7U87HKLzVxKVY9ZMT9oLf
 mTpR95uIF2ascBuY8UZFEU3Y3DN9Scl3E3ziRqb+J/5FcISuVmKNYMjkNCIoTIvnZdaJ
 E4Dj1T2+RE1n6y7qn7luvc+bGBqqzxnAhlr2iFGaR+dXN1NKziwvfjO7DpVaCd6AckmK
 h5HnYkJSH1xIO7/S2Ys8pVx/qj2ulAk/s0i591uWO+SfnaKjS+7R9ldswfkFRgNg5Pf2
 TF7+cJSLOzNDgQDwJCv6pE64l7SJBjmCeMb2nmcIX3GbUhd2HOAyGIFL61QUtQpx07FG
 moPg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=gLf1swf4ZJXXJhGaHoYxaT5V6VsJEBd3ddnRWReokcA=;
 b=Lfm8Xtzw3mQwtok4RU8rtfhUwoCuuqX9EmbEJ7fwd0t9vGTDRItUt1Yaez8p5iG/nh
 zbtwtN6h0rNuvtTDv9h1QpxYEjGXFAxygm2RCQroVa0FdXnrfBBuUizJvePJtil5tNj+
 IS7CtV8Ad6KCrbF72AhKT4lpylulMZ4eKOxzfqqOaPFjmvGXSHD/DtwkxgDDU7jBHJFd
 I5ILabI89SyDkdMVD7ku250WSZLHg081dJVKY/uqdhdKHO8mmTQjR/O99+0uAyh2MpAk
 sIfyp6JNpPtkzkpK9vqOQNQfFl6KU2wFzYkROuRNIUfG79EDS0kA90pynG/+GYtFy4dp
 YjUg==
X-Gm-Message-State: AGi0PubmQPd3yfsoctCuIBI1+IWOnRC6upOAJkl9gYqrhqIr494wweM7
 1nc9MsThrBQo6dna9oejcGC3v+1h2W4wrhBMY78=
X-Google-Smtp-Source: APiQypK0dLdnhX7FT1fQQpV0pGMCwBD7T2M6iAAFhBO62yrONmzUNYYCqE5+SOAmLiBJMti1igemrofjw0phXYav9wU=
X-Received: by 2002:a9d:5f04:: with SMTP id f4mr8159390oti.154.1588787700191; 
 Wed, 06 May 2020 10:55:00 -0700 (PDT)
MIME-Version: 1.0
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
 <CAOqdjBcxGpHxSPS4rLGAbS06Q_QjUMPz1GMae+neEGENNEEHPA@HIDDEN>
 <CADwFkm=TZ6O3Wocst8E047g4VAFu3n8MaVL1ZQSEopMkxkTkfw@HIDDEN>
 <CAOqdjBc+qQaiBMK9pAZbyMZm3nhVZdF4UHE15My01ivfOZ9F0A@HIDDEN>
 <CADwFkmkJxwZcZ2LGRGe0VdEYTA3BSxse-2yRogF+ou0y0Zt1=g@HIDDEN>
 <83lfm5kvn4.fsf@HIDDEN>
In-Reply-To: <83lfm5kvn4.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Wed, 6 May 2020 17:54:23 +0000
Message-ID: <CAOqdjBc2+_mMt5sn3MvFvKq8yeQcbuu5=6pTvNbiPA3CPO1d2w@HIDDEN>
Subject: Re: bug#40968: 28.0.50; (apply nil)
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/mixed; boundary="0000000000007e9c8f05a4fe76f8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org, Stefan Kangas <stefan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000007e9c8f05a4fe76f8
Content-Type: text/plain; charset="UTF-8"

On Wed, May 6, 2020 at 2:04 PM Eli Zaretskii <eliz@HIDDEN> wrote:
> 'apply' is a very popular function, and is used very widely.  I won't
> be surprised if there were more of these usage cases that would be
> broken by such a change in the signature.

> Can we instead identify the problematic usage and signal an error?

Yes. What we also have to do is fix the documentation, and fix the
byte optimizer.

Here's a first suggestion. I'd particularly appreciate hints on better
wording for the documentation.

--0000000000007e9c8f05a4fe76f8
Content-Type: text/x-patch; charset="US-ASCII"; 
	name="0001-Handle-single-argument-apply-consistently-bug-40968.patch"
Content-Disposition: attachment; 
	filename="0001-Handle-single-argument-apply-consistently-bug-40968.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_k9vn2mzh0>
X-Attachment-Id: f_k9vn2mzh0

RnJvbSBmYTgxOTA0NTc2NmY1MGM1NWY5YmI1ODhlY2Y3ZTBiZWY2YTU2ZDQxIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBQaXAgQ2V0IDxwaXBjZXRAZ21haWwuY29tPgpEYXRlOiBXZWQs
IDYgTWF5IDIwMjAgMTc6NDY6NTYgKzAwMDAKU3ViamVjdDogW1BBVENIXSBIYW5kbGUgc2luZ2xl
LWFyZ3VtZW50IGBhcHBseScgY29uc2lzdGVudGx5IChidWcjNDA5NjgpCgotLS0KIGRvYy9saXNw
cmVmL2Z1bmN0aW9ucy50ZXhpICB8ICA5ICsrKysrKysrKwogbGlzcC9lbWFjcy1saXNwL2J5dGUt
b3B0LmVsIHwgMjkgKysrKysrKysrKysrKysrKy0tLS0tLS0tLS0tLS0KIHNyYy9ldmFsLmMgICAg
ICAgICAgICAgICAgICB8ICA1ICsrKysrCiAzIGZpbGVzIGNoYW5nZWQsIDMwIGluc2VydGlvbnMo
KyksIDEzIGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL2RvYy9saXNwcmVmL2Z1bmN0aW9ucy50
ZXhpIGIvZG9jL2xpc3ByZWYvZnVuY3Rpb25zLnRleGkKaW5kZXggYmM4ZWMwZWYxYi4uMDU0YmNj
MTY5ZSAxMDA2NDQKLS0tIGEvZG9jL2xpc3ByZWYvZnVuY3Rpb25zLnRleGkKKysrIGIvZG9jL2xp
c3ByZWYvZnVuY3Rpb25zLnRleGkKQEAgLTc2MSw2ICs3NjEsMTAgQEAgQ2FsbGluZyBGdW5jdGlv
bnMKIEBkZm57c3ByZWFkc30gdGhpcyBsaXN0IHNvIHRoYXQgZWFjaCBpbmRpdmlkdWFsIGVsZW1l
bnQgYmVjb21lcyBhbgogYXJndW1lbnQuCiAKK0Bjb2Rle2FwcGx5fSB3aXRoIGEgc2luZ2xlIGFy
Z3VtZW50IGlzIHNwZWNpYWw6IHRoZSBmaXJzdCBlbGVtZW50IG9mCit0aGUgYXJndW1lbnQsIHdo
aWNoIG11c3QgYmUgYSBub24tZW1wdHkgbGlzdCwgaXMgY2FsbGVkIGFzIGEgZnVuY3Rpb24KK3dp
dGggdGhlIHJlbWFpbmluZyBlbGVtZW50cyBhcyBpbmRpdmlkdWFsIGFyZ3VtZW50cy4KKwogQGNv
ZGV7YXBwbHl9IHJldHVybnMgdGhlIHJlc3VsdCBvZiBjYWxsaW5nIEB2YXJ7ZnVuY3Rpb259LiAg
QXMgd2l0aAogQGNvZGV7ZnVuY2FsbH0sIEB2YXJ7ZnVuY3Rpb259IG11c3QgZWl0aGVyIGJlIGEg
TGlzcCBmdW5jdGlvbiBvciBhCiBwcmltaXRpdmUgZnVuY3Rpb247IHNwZWNpYWwgZm9ybXMgYW5k
IG1hY3JvcyBkbyBub3QgbWFrZSBzZW5zZSBpbgpAQCAtNzg4LDYgKzc5MiwxMSBAQCBDYWxsaW5n
IEZ1bmN0aW9ucwogKGFwcGx5ICdhcHBlbmQgJygoYSBiIGMpIG5pbCAoeCB5IHopIG5pbCkpCiAg
ICAgIEByZXN1bHR7fSAoYSBiIGMgeCB5IHopCiBAZW5kIGdyb3VwCisKK0Bncm91cAorKGFwcGx5
ICcoKyAzIDQpKQorICAgICBAcmVzdWx0e30gNworQGVuZCBncm91cAogQGVuZCBleGFtcGxlCiAK
IEZvciBhbiBpbnRlcmVzdGluZyBleGFtcGxlIG9mIHVzaW5nIEBjb2Rle2FwcGx5fSwgc2VlIEBy
ZWZ7RGVmaW5pdGlvbgpkaWZmIC0tZ2l0IGEvbGlzcC9lbWFjcy1saXNwL2J5dGUtb3B0LmVsIGIv
bGlzcC9lbWFjcy1saXNwL2J5dGUtb3B0LmVsCmluZGV4IDRmNzIyNTFhZWQuLjMyZTUzYmI3ZTkg
MTAwNjQ0Ci0tLSBhL2xpc3AvZW1hY3MtbGlzcC9ieXRlLW9wdC5lbAorKysgYi9saXNwL2VtYWNz
LWxpc3AvYnl0ZS1vcHQuZWwKQEAgLTEwOTgsMTkgKzEwOTgsMjIgQEAgYnl0ZS1vcHRpbWl6ZS1m
dW5jYWxsCiAoZGVmdW4gYnl0ZS1vcHRpbWl6ZS1hcHBseSAoZm9ybSkKICAgOzsgSWYgdGhlIGxh
c3QgYXJnIGlzIGEgbGl0ZXJhbCBjb25zdGFudCwgdHVybiB0aGlzIGludG8gYSBmdW5jYWxsLgog
ICA7OyBUaGUgZnVuY2FsbCBvcHRpbWl6ZXIgY2FuIHRoZW4gdHJhbnNmb3JtIChmdW5jYWxsICdm
b28gLi4uKSAtPiAoZm9vIC4uLikuCi0gIChsZXQgKChmbiAobnRoIDEgZm9ybSkpCi0JKGxhc3Qg
KG50aCAoMS0gKGxlbmd0aCBmb3JtKSkgZm9ybSkpKSA7IEkgdGhpbmsgdGhpcyByZWFsbHkgaXMg
ZmFzdGVzdAotICAgIChvciAoaWYgKG9yIChudWxsIGxhc3QpCi0JCShlcSAoY2FyLXNhZmUgbGFz
dCkgJ3F1b3RlKSkKLQkgICAgKGlmIChsaXN0cCAobnRoIDEgbGFzdCkpCi0JCShsZXQgKChidXRs
YXN0IChucmV2ZXJzZSAoY2RyIChyZXZlcnNlIChjZHIgKGNkciBmb3JtKSkpKSkpKQotCQkgIChu
Y29uYyAobGlzdCAnZnVuY2FsbCBmbikgYnV0bGFzdAotCQkJIChtYXBjYXIgKGxhbWJkYSAoeCkg
KGxpc3QgJ3F1b3RlIHgpKSAobnRoIDEgbGFzdCkpKSkKLQkgICAgICAoYnl0ZS1jb21waWxlLXdh
cm4KLQkgICAgICAgImxhc3QgYXJnIHRvIGFwcGx5IGNhbid0IGJlIGEgbGl0ZXJhbCBhdG9tOiBg
JXMnIgotCSAgICAgICAocHJpbjEtdG8tc3RyaW5nIGxhc3QpKQotCSAgICAgIG5pbCkpCi0JZm9y
bSkpKQorICAoaWYgKD0gKGxlbmd0aCBmb3JtKSAyKQorICAgICAgOzsgc2luZ2xlLWFyZ3VtZW50
IGBhcHBseScgaXMgc3BlY2lhbCAoYnVnIzQwOTY4KQorICAgICAgKGJ5dGUtb3B0aW1pemUtYXBw
bHkgYChhcHBseSAjJ2Z1bmNhbGwgLChjYWRyIGZvcm0pKSkKKyAgICAobGV0ICgoZm4gKG50aCAx
IGZvcm0pKQorCSAgKGxhc3QgKG50aCAoMS0gKGxlbmd0aCBmb3JtKSkgZm9ybSkpKSA7IEkgdGhp
bmsgdGhpcyByZWFsbHkgaXMgZmFzdGVzdAorICAgICAgKG9yIChpZiAob3IgKG51bGwgbGFzdCkK
KwkJICAoZXEgKGNhci1zYWZlIGxhc3QpICdxdW90ZSkpCisJICAgICAgKGlmIChsaXN0cCAobnRo
IDEgbGFzdCkpCisJCSAgKGxldCAoKGJ1dGxhc3QgKG5yZXZlcnNlIChjZHIgKHJldmVyc2UgKGNk
ciAoY2RyIGZvcm0pKSkpKSkpCisJCSAgICAobmNvbmMgKGxpc3QgJ2Z1bmNhbGwgZm4pIGJ1dGxh
c3QKKwkJCSAgIChtYXBjYXIgKGxhbWJkYSAoeCkgKGxpc3QgJ3F1b3RlIHgpKSAobnRoIDEgbGFz
dCkpKSkKKwkgICAgICAgIChieXRlLWNvbXBpbGUtd2FybgorCSAgICAgICAgICJsYXN0IGFyZyB0
byBhcHBseSBjYW4ndCBiZSBhIGxpdGVyYWwgYXRvbTogYCVzJyIKKwkgICAgICAgICAocHJpbjEt
dG8tc3RyaW5nIGxhc3QpKQorCSAgICAgICAgbmlsKSkKKwkgIGZvcm0pKSkpCiAKIChwdXQgJ2Z1
bmNhbGwgJ2J5dGUtb3B0aW1pemVyICdieXRlLW9wdGltaXplLWZ1bmNhbGwpCiAocHV0ICdhcHBs
eSAgICdieXRlLW9wdGltaXplciAnYnl0ZS1vcHRpbWl6ZS1hcHBseSkKZGlmZiAtLWdpdCBhL3Ny
Yy9ldmFsLmMgYi9zcmMvZXZhbC5jCmluZGV4IDAxNDkwNWNlNmQuLjc3ZjU0YWQ3YjEgMTAwNjQ0
Ci0tLSBhL3NyYy9ldmFsLmMKKysrIGIvc3JjL2V2YWwuYwpAQCAtMjM2MSw2ICsyMzYxLDggQEAg
ZXZhbF9zdWIgKExpc3BfT2JqZWN0IGZvcm0pCiBERUZVTiAoImFwcGx5IiwgRmFwcGx5LCBTYXBw
bHksIDEsIE1BTlksIDAsCiAgICAgICAgZG9jOiAvKiBDYWxsIEZVTkNUSU9OIHdpdGggb3VyIHJl
bWFpbmluZyBhcmdzLCB1c2luZyBvdXIgbGFzdCBhcmcgYXMgbGlzdCBvZiBhcmdzLgogVGhlbiBy
ZXR1cm4gdGhlIHZhbHVlIEZVTkNUSU9OIHJldHVybnMuCitXaXRoIGEgc2luZ2xlIGFyZ3VtZW50
LCBjYWxsIHRoZSBhcmd1bWVudCdzIGZpcnN0IGVsZW1lbnQgdXNpbmcgdGhlCitvdGhlciBlbGVt
ZW50cyBhcyBhcmdzLgogVGh1cywgKGFwcGx5IFxcPScrIDEgMiBcXD0nKDMgNCkpIHJldHVybnMg
MTAuCiB1c2FnZTogKGFwcGx5IEZVTkNUSU9OICZyZXN0IEFSR1VNRU5UUykgICovKQogICAocHRy
ZGlmZl90IG5hcmdzLCBMaXNwX09iamVjdCAqYXJncykKQEAgLTIzNzMsNiArMjM3NSw5IEBAIERF
RlVOICgiYXBwbHkiLCBGYXBwbHksIFNhcHBseSwgMSwgTUFOWSwgMCwKIAogICBwdHJkaWZmX3Qg
bnVtYXJncyA9IGxpc3RfbGVuZ3RoIChzcHJlYWRfYXJnKTsKIAorICBpZiAobnVtYXJncyA9PSAw
ICYmIG5hcmdzID09IDEpCisgICAgd3JvbmdfdHlwZV9hcmd1bWVudCAoUWNvbnNwLCBzcHJlYWRf
YXJnKTsKKwogICBpZiAobnVtYXJncyA9PSAwKQogICAgIHJldHVybiBGZnVuY2FsbCAobmFyZ3Mg
LSAxLCBhcmdzKTsKICAgZWxzZSBpZiAobnVtYXJncyA9PSAxKQotLSAKMi4yNi4yCgo=
--0000000000007e9c8f05a4fe76f8--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 17:46:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 13:46:16 2020
Received: from localhost ([127.0.0.1]:41128 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWO7c-0007cn-3Q
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 13:46:16 -0400
Received: from aserp2120.oracle.com ([141.146.126.78]:47692)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1jWO7Z-0007cZ-Af
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 13:46:14 -0400
Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1])
 by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046HhFl9106704;
 Wed, 6 May 2020 17:46:07 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-2020-01-29;
 bh=fsR99cdI3IhFEYKdjT6EEgMjyvISuwhapiN0CvPQGg4=;
 b=OvZHAiG24vidr0UwNZA840IYCRILzxYSVsOOYGB0o0yluKmEbbjio377uCUs/QDixCIf
 IU/cAx15RCiLx2ROvIYCxl2BRoXQb4UHlNb9P2kFuOpLCMYnjQR5I998EdyLc+9TKYsC
 s9MJ+bSm+Byx3VotIbfcEG6FxA5lgNFxHcG9ugRb2O+BRNThlXt21y0QCFUz4+XRoeAU
 /uKf7X2oqzeYabsiaiUC7Dny2UcDkpmnIILND0Iigg6jmbtQw9oul/GjggOESmPpi+v4
 BYPDN5zqlGBJ7KhWRJMKa/UiX8n42QX6cOUWJhxVzPyxiqinEQsnpKxuNAqBg4YfebUS vw== 
Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71])
 by aserp2120.oracle.com with ESMTP id 30usgq2x72-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 06 May 2020 17:46:07 +0000
Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1])
 by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046Hgp5K181652;
 Wed, 6 May 2020 17:46:07 GMT
Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72])
 by aserp3030.oracle.com with ESMTP id 30sjdw0wmq-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 06 May 2020 17:46:07 +0000
Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24])
 by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 046Hk5wc004329;
 Wed, 6 May 2020 17:46:05 GMT
MIME-Version: 1.0
Message-ID: <240afa71-7aaa-49b9-94b6-7d363a42b1cc@default>
Date: Wed, 6 May 2020 10:46:04 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>, Stefan Kangas <stefan@HIDDEN>
Subject: RE: bug#40968: 28.0.50; (apply nil)
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
 <CAOqdjBcxGpHxSPS4rLGAbS06Q_QjUMPz1GMae+neEGENNEEHPA@HIDDEN>
 <CADwFkm=TZ6O3Wocst8E047g4VAFu3n8MaVL1ZQSEopMkxkTkfw@HIDDEN>
 <CAOqdjBc+qQaiBMK9pAZbyMZm3nhVZdF4UHE15My01ivfOZ9F0A@HIDDEN>
In-Reply-To: <CAOqdjBc+qQaiBMK9pAZbyMZm3nhVZdF4UHE15My01ivfOZ9F0A@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4993.0 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613
 signatures=668687
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
 suspectscore=0 mlxscore=0
 bulkscore=0 adultscore=0 phishscore=0 mlxlogscore=840 malwarescore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000
 definitions=main-2005060144
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613
 signatures=668687
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 impostorscore=0
 mlxscore=0
 priorityscore=1501 lowpriorityscore=0 malwarescore=0 clxscore=1011
 mlxlogscore=887 spamscore=0 adultscore=0 bulkscore=0 phishscore=0
 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2003020000 definitions=main-2005060144
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Dunno whether this has been mentioned in this
thread (haven't followed it).

The signature in Common Lisp (which is more or
less the _common_ ground of several Lisps from
the 70s & 80s) is this:

 (apply function arg &rest more-args)

I don't see why Emacs Lisp should be different.
Is there a good reason?  Is there some advantage
to being able to do just (apply #'foo)?  Why do
we use this signature:

 (apply FUNCTION &rest ARGUMENTS)

https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node81.html




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 15:28:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 11:28:57 2020
Received: from localhost ([127.0.0.1]:40882 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWLyi-00044W-QJ
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 11:28:56 -0400
Received: from mail-yb1-f175.google.com ([209.85.219.175]:41907)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1jWLyh-00044K-CQ
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 11:28:55 -0400
Received: by mail-yb1-f175.google.com with SMTP id w137so1182149ybg.8
 for <40968 <at> debbugs.gnu.org>; Wed, 06 May 2020 08:28:55 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:in-reply-to:references:mime-version:date
 :message-id:subject:to:cc;
 bh=rhe6p4UuBPxUa1Ps6MU3VSXRhRaAeaOhOTv71kMP8Lw=;
 b=RKNZ62pdzfPi2tasKa/w6rSlzUsn/jpB9BGWWj+5QCORNuHc2qN/e3fO3j66HQRuf/
 wSw7MMBimiF7tlF5L5ODtVkDR0qvHzDMyQAk/kAVLGTZDAnONi2+lAVAp49XlxXS+R37
 fFKRsHycLb9+L8qcR8XG6Nkt+pCwUJK9C/bdAlo/iece3/iw8WO/vx6N4u6YDY4zb/4A
 aClCV0PGIhiL8OyFKMJK/x2PIDmSQW7/XT7be+6tv5408LciBNjGi7BJ+zf1VUZ57poG
 b0l4x48aRm/Y1QVDDZ1c96JavIO2ckF8aTCVS9w9AqozAaS8ovsq7wr2ho5l4W4iNCsW
 Ehsw==
X-Gm-Message-State: AGi0PuadgyZ4F2oJ3UfzsxbeOlL6ER2ym7uYTnTkRi6j9JCznuNJ40WY
 Hxe+6oYmbnIpdaODKkQosj/5gRXg4VFCl++f2vA=
X-Google-Smtp-Source: APiQypLQnjjx/21n+s8tHJ5gK0CYi2vQJj14rxl7hnUallvsg4/KWK8BsGPvRh/uZ0oJ7jR4SH4QEdq8YQy/w0jOpYM=
X-Received: by 2002:a25:bb08:: with SMTP id z8mr1612348ybg.129.1588778929630; 
 Wed, 06 May 2020 08:28:49 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Wed, 6 May 2020 11:28:49 -0400
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <CAOqdjBe+UiPTUSV_nC7ZLp+jNG7D6UhrrLTw60Jqn6wpCpMYKg@HIDDEN>
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
 <CAOqdjBcxGpHxSPS4rLGAbS06Q_QjUMPz1GMae+neEGENNEEHPA@HIDDEN>
 <CADwFkm=TZ6O3Wocst8E047g4VAFu3n8MaVL1ZQSEopMkxkTkfw@HIDDEN>
 <CAOqdjBc+qQaiBMK9pAZbyMZm3nhVZdF4UHE15My01ivfOZ9F0A@HIDDEN>
 <CADwFkmkJxwZcZ2LGRGe0VdEYTA3BSxse-2yRogF+ou0y0Zt1=g@HIDDEN>
 <CAOqdjBe+UiPTUSV_nC7ZLp+jNG7D6UhrrLTw60Jqn6wpCpMYKg@HIDDEN>
MIME-Version: 1.0
Date: Wed, 6 May 2020 11:28:49 -0400
Message-ID: <CADwFkmmwcunMQG12Rt_pG3ztCOjxWRj5MtcvP4TWVU1Hoq4gAw@HIDDEN>
Subject: Re: bug#40968: 28.0.50; (apply nil)
To: Pip Cet <pipcet@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Pip Cet <pipcet@HIDDEN> writes:

> Is the function signature relevant for anything but eldoc?

Besides the docstring, the manual documents it.  The suggested form is
unusual and makes it harder to understand, IMHO.

>> apply is fundamental to Lisp, and has been defined like this for a
>> long time.
>
> I don't know about that. Anything but the two-argument form of apply
> strikes me as rather dialect-dependent, but I may be wrong.

If I understand correctly, you propose a three argument form:

    (apply FUNCTION ARGUMENT &rest ARGUMENTS)

This is what I find unusual.  It should really be either

    (apply FUNCTION &rest ARGUMENTS)

or

    (apply FUNCTION ARGUMENTS)

But since we already have the former, we are better to stick with
that.

Maybe there's a case to be made for a syntactic alternative to "&rest"
which disallows nil, which I guess is the issue here?  But we can also
just signal an error in this case.

Racket does the latter, as one data point:

    > (define foo (lambda () 1))
    > (apply foo nil)
    ; nil: undefined;
    ;  cannot reference an identifier before its definition
    ;   in module: top-level
    ; [,bt for context]

BTW, I don't see a big difference conceptually between '&rest
ARGUMENTS' and 'ARGUMENTS'.  The former is just syntactic sugar,
right?

>> See the definition of "The Universal S-Function apply" in
>> John McCarthy's paper: [1]
>>
>>     apply[f;args] =eval[cons[f;appq[args]];NIL],
>
> I must admit I don't know how appq is defined.

My point is mainly that it has two arguments: f and args.

Best regards,
Stefan Kangas




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 14:04:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 10:04:26 2020
Received: from localhost ([127.0.0.1]:40761 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWKev-0001wi-Ny
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 10:04:26 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49758)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jWKet-0001wT-La
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 10:04:24 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:55590)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jWKeo-0005rJ-2o; Wed, 06 May 2020 10:04:18 -0400
Received: from [176.228.60.248] (port=3368 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jWKen-0004Fm-FT; Wed, 06 May 2020 10:04:17 -0400
Date: Wed, 06 May 2020 17:03:59 +0300
Message-Id: <83lfm5kvn4.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <CADwFkmkJxwZcZ2LGRGe0VdEYTA3BSxse-2yRogF+ou0y0Zt1=g@HIDDEN>
 (message from Stefan Kangas on Wed, 6 May 2020 06:02:45 -0700)
Subject: Re: bug#40968: 28.0.50; (apply nil)
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
 <CAOqdjBcxGpHxSPS4rLGAbS06Q_QjUMPz1GMae+neEGENNEEHPA@HIDDEN>
 <CADwFkm=TZ6O3Wocst8E047g4VAFu3n8MaVL1ZQSEopMkxkTkfw@HIDDEN>
 <CAOqdjBc+qQaiBMK9pAZbyMZm3nhVZdF4UHE15My01ivfOZ9F0A@HIDDEN>
 <CADwFkmkJxwZcZ2LGRGe0VdEYTA3BSxse-2yRogF+ou0y0Zt1=g@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stefan Kangas <stefan@HIDDEN>
> Date: Wed, 6 May 2020 06:02:45 -0700
> Cc: 40968 <at> debbugs.gnu.org
> 
> Pip Cet <pipcet@HIDDEN> writes:
> 
> > (apply FUNCTION ARGUMENT &rest ARGUMENTS), I guess. I missed it in the
> > first patch.
> 
> Thanks.
> 
> FWIW, I still think we should avoid changing the function signature if
> at all possible.

I agree.  I also think it isn't enough to check only here and in ELPA:
'apply' is a very popular function, and is used very widely.  I won't
be surprised if there were more of these usage cases that would be
broken by such a change in the signature.

Can we instead identify the problematic usage and signal an error?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 13:56:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 09:56:40 2020
Received: from localhost ([127.0.0.1]:40757 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWKXP-0001ka-Vn
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 09:56:40 -0400
Received: from mail-ot1-f43.google.com ([209.85.210.43]:42476)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jWKXN-0001kU-Sm
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 09:56:38 -0400
Received: by mail-ot1-f43.google.com with SMTP id m18so1383036otq.9
 for <40968 <at> debbugs.gnu.org>; Wed, 06 May 2020 06:56:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=sj+oCTd4Lbb4I2CETalupYcABGxu1KrzgTVUZ764SSs=;
 b=OQxYvkJYRqbEz4MKT+fUxsMhRTg4HcrL3CbqAAYNrrjFEyCyMjT3bmqYdJiiGsBY6C
 bS7G1yx1okmv/FjI4EXel+ou1shtijuONbkLxq/hBYjjfTldF/PbSmdxmLV1SY/n4tFz
 AkyMlpo8nFSJPgSOuD1EfY6X2qTPMwNykyznVmXf+Pv1BouOTp94Nq44PlMi2/Bra3L0
 RHwlvsoAAeA56HtSDCODPb5sLOznJt4tBzZTjyuTrRnMKSYmOdwwhY0HqKjFiQPbDYNo
 RQzT5jfrKAMct/ijYmt098RL1gchuGpR9d10qa+tWwYwxKUWERdondViCncw9pa/Ohus
 JAcA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=sj+oCTd4Lbb4I2CETalupYcABGxu1KrzgTVUZ764SSs=;
 b=ZFeqIJw1qR8MOfv4b75Q5iNlEQeo8WDN2JHt4kGprm6yo24kvlbIvALQ/LuQigcb/n
 aXE1wKgXNb+s0y57s+msy0mZxT4GbqoqRtY1YCbTSrZ9JMu6bHfZrhrsdIbITYXUElNu
 LkA8b2lKnKBhupeoC2ghWmEnC1NZKuNhEw15N57HawwtWKbpa3jOWh5KBYfh5wBW22ta
 pDYrvon00x+DVpDcBl6Hq3BMzBzYjynqcwc0DGli3MNnrovhXCGbaJFU2epR/MTwsmXO
 jqnDV7aXIS8PlkaCPCOjGEnCX8lUTjkk8Ld3miRMEr+yl0tSmQQRowSYUDElmLq2Mu1o
 5XXw==
X-Gm-Message-State: AGi0Pub+dpt26mZLCpKQIEcq4Q217+AXx4H0zWpzc4jet7ZKYipTD6fN
 us8KZ5QMldDBBHJJctFijOQK1eam4WYsx7q/i+1MuWcF
X-Google-Smtp-Source: APiQypKc4Pmwkxy2d2g+j11nzkCsGChG0WVASdh87CzMpsOWam2zyM3amGDy+fkyr/aTZkLJbZYSD6jBkVWNWh2YJSQ=
X-Received: by 2002:a9d:6b98:: with SMTP id b24mr6391732otq.287.1588773392054; 
 Wed, 06 May 2020 06:56:32 -0700 (PDT)
MIME-Version: 1.0
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
 <CAOqdjBcxGpHxSPS4rLGAbS06Q_QjUMPz1GMae+neEGENNEEHPA@HIDDEN>
 <CADwFkm=TZ6O3Wocst8E047g4VAFu3n8MaVL1ZQSEopMkxkTkfw@HIDDEN>
 <CAOqdjBc+qQaiBMK9pAZbyMZm3nhVZdF4UHE15My01ivfOZ9F0A@HIDDEN>
 <CADwFkmkJxwZcZ2LGRGe0VdEYTA3BSxse-2yRogF+ou0y0Zt1=g@HIDDEN>
In-Reply-To: <CADwFkmkJxwZcZ2LGRGe0VdEYTA3BSxse-2yRogF+ou0y0Zt1=g@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Wed, 6 May 2020 13:55:55 +0000
Message-ID: <CAOqdjBe+UiPTUSV_nC7ZLp+jNG7D6UhrrLTw60Jqn6wpCpMYKg@HIDDEN>
Subject: Re: bug#40968: 28.0.50; (apply nil)
To: Stefan Kangas <stefan@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Wed, May 6, 2020 at 1:02 PM Stefan Kangas <stefan@HIDDEN> wrote:
> Pip Cet <pipcet@HIDDEN> writes:
> > (apply FUNCTION ARGUMENT &rest ARGUMENTS), I guess. I missed it in the
> > first patch.
>
> Thanks.
>
> FWIW, I still think we should avoid changing the function signature if
> at all possible.

Is the function signature relevant for anything but eldoc?

> apply is fundamental to Lisp, and has been defined like this for a
> long time.

I don't know about that. Anything but the two-argument form of apply
strikes me as rather dialect-dependent, but I may be wrong.

> See the definition of "The Universal S-Function apply" in
> John McCarthy's paper: [1]
>
>     apply[f;args] =eval[cons[f;appq[args]];NIL],

I must admit I don't know how appq is defined.

> Also note that it is still defined like this elsewhere:

I may be misreading your examples, but they seem to me to have
different signatures from the one hitherto used in Emacs.

> Scheme: (apply function argument-list)

Precisely two args, right?

> Common Lisp:  apply function &rest args+ => result*

At least two args.

> Clojure: (apply f args)

Precisely two args again?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 13:02:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 09:02:55 2020
Received: from localhost ([127.0.0.1]:38918 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWJhP-0008PV-4c
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 09:02:55 -0400
Received: from mail-yb1-f180.google.com ([209.85.219.180]:45961)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1jWJhL-0008PI-ET
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 09:02:52 -0400
Received: by mail-yb1-f180.google.com with SMTP id r14so924375ybm.12
 for <40968 <at> debbugs.gnu.org>; Wed, 06 May 2020 06:02:51 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:in-reply-to:references:mime-version:date
 :message-id:subject:to:cc;
 bh=lHqOTKe2U9vmN/pJTeGz3lKGcrobARrewDb/ux/wqME=;
 b=Po6ND/8fo6UjfDjpSreAUyYF2TNBJD99m2bBzbGy2CO0gPmWAH1ju9dzQYHS0hcQeM
 t6YOyG6QDRtpBy1hD22H0mLYC3reIun0B4uuUH2IvVyLecIdt7S5H+Qg5fFrf0BTx88I
 gF6ioxX0DeUFaAohNnFEoUByfsumfpq6/Ck/tpyHMroksLKlW1BgLf+XU6ye2ZCjGXtv
 u5M9rW/LrMnaaHyBTjOPZL+drb/8/AF3czi9ycFJKqc2TeZmMcExJkCcwWW83d+T5C3s
 m2fizOxwrBUJf+Aa0WPhARFW/95ifICgHbneZW4A0WHig/CPZxqlpjc8Sdc9vMjCyrjH
 TdXg==
X-Gm-Message-State: AGi0Pub2zBh/6/m5v+1bLggKgW3d+hmd+OqElorcuR2MAoTWXYGhbiMi
 ypDXkaQ+Te6vWytcuosMOR2IFCABjxw/HYBf5Lw=
X-Google-Smtp-Source: APiQypK5xdvaWIqVgQTK52AN9k2yRzJN5kGuefYHBJcWO1d4D0TC1jiNNYqALJAHKGkA6md5R6qtI+QCC1tVFaAkASA=
X-Received: by 2002:a25:e907:: with SMTP id n7mr13034924ybd.85.1588770165906; 
 Wed, 06 May 2020 06:02:45 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Wed, 6 May 2020 06:02:45 -0700
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <CAOqdjBc+qQaiBMK9pAZbyMZm3nhVZdF4UHE15My01ivfOZ9F0A@HIDDEN>
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
 <CAOqdjBcxGpHxSPS4rLGAbS06Q_QjUMPz1GMae+neEGENNEEHPA@HIDDEN>
 <CADwFkm=TZ6O3Wocst8E047g4VAFu3n8MaVL1ZQSEopMkxkTkfw@HIDDEN>
 <CAOqdjBc+qQaiBMK9pAZbyMZm3nhVZdF4UHE15My01ivfOZ9F0A@HIDDEN>
MIME-Version: 1.0
Date: Wed, 6 May 2020 06:02:45 -0700
Message-ID: <CADwFkmkJxwZcZ2LGRGe0VdEYTA3BSxse-2yRogF+ou0y0Zt1=g@HIDDEN>
Subject: Re: bug#40968: 28.0.50; (apply nil)
To: Pip Cet <pipcet@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Pip Cet <pipcet@HIDDEN> writes:

> (apply FUNCTION ARGUMENT &rest ARGUMENTS), I guess. I missed it in the
> first patch.

Thanks.

FWIW, I still think we should avoid changing the function signature if
at all possible.

apply is fundamental to Lisp, and has been defined like this for a
long time.  See the definition of "The Universal S-Function apply" in
John McCarthy's paper: [1]

    apply[f;args] =eval[cons[f;appq[args]];NIL],

Also note that it is still defined like this elsewhere:

Scheme: (apply function argument-list)
Common Lisp:  apply function &rest args+ => result*
Clojure: (apply f args)

Best regards,
Stefan Kangas

Footnotes:
[1]  http://www-formal.stanford.edu/jmc/recursive.pdf




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 11:50:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 07:50:09 2020
Received: from localhost ([127.0.0.1]:38833 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWIYz-0004We-5J
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 07:50:09 -0400
Received: from mail-oi1-f182.google.com ([209.85.167.182]:34345)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jWIYx-0004W7-OV
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 07:50:08 -0400
Received: by mail-oi1-f182.google.com with SMTP id c12so443322oic.1
 for <40968 <at> debbugs.gnu.org>; Wed, 06 May 2020 04:50:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=VMYvqFcPsZo6gO5p1EvXJqw1wR1Yg5Eed5G+/v038DQ=;
 b=qeG6sHrAzWZv4xLg8et/zKm+s2cPshM8WZmw6eHjJCI1imiuodH2NR+k8kQoDqfXKS
 3rN6X7WN/5IffmvZN81053mQagdL3e3UABn47afRbDttkGBNAD6t5Ee3dthVN3NnpDEe
 kYg3V3FnlOpRee3EEi1QAR/BtkrDJvUlXv60yrFJ9SIsmtZOwpxrqCocqQ59LAyyGybs
 evdqS3BQApOTIGuMt5GkLI3THhxN6WEeJcVs+Xm53aoQNDXKRCT9z7g4cMl3mfohvsls
 aQ+MX0FZvegWD0UgMGXz0npaFvip0v9VWSUqYnkwYwwj5f/cioLmQVFCrQepMC8sOAQT
 gO1Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=VMYvqFcPsZo6gO5p1EvXJqw1wR1Yg5Eed5G+/v038DQ=;
 b=JDmVn2jX0XRk1F/FCPy+IA0pRxNBicuECn4v0c91K80qKQw/HfiMHPC4paIoBXPb73
 u2Cmn855OU5hTCN2NRt06w0uPJrqtgR4sGtcgN/TCsfch9uDHxC/EsAfTRVr+dJ3yfj9
 Ubjl0zSWxCqQiX4UALRnEOT4KciPEvFsMM1ll9MJkDt4/Ur3IGZkqZXyBSIpf3zhiJCy
 fA1QDTZd5hc8/W296JUnDGFY4hWMbNlhv0k1yat34f6ek3dg/PYKu6oDZkG6QCO1VC6K
 e1C+YPKLDeksh0LU3MOtussVI3R94ImhNO69Aw/bChxuiF2pjbh4DUiL1ogpxrKWDcP3
 6oyA==
X-Gm-Message-State: AGi0PuZforIKVNVTINQID3jQbVghl5zv6AgW8MIUJB/wY33aQAqLFvc5
 pBS/iUR+uQn/MelmDvQxlBdFDAwpaqaKRgt5Gxm95Tk3Z1c=
X-Google-Smtp-Source: APiQypL8fjp7DUp5vhJJ1m8rQUdXinYHErN2HvWyT0V5otBBXarYseFZlILceow2XGsN/tmoNRg4omeUax6C+8l5x5w=
X-Received: by 2002:aca:6705:: with SMTP id z5mr2230869oix.122.1588765802115; 
 Wed, 06 May 2020 04:50:02 -0700 (PDT)
MIME-Version: 1.0
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
 <CAOqdjBcxGpHxSPS4rLGAbS06Q_QjUMPz1GMae+neEGENNEEHPA@HIDDEN>
 <CADwFkm=TZ6O3Wocst8E047g4VAFu3n8MaVL1ZQSEopMkxkTkfw@HIDDEN>
In-Reply-To: <CADwFkm=TZ6O3Wocst8E047g4VAFu3n8MaVL1ZQSEopMkxkTkfw@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Wed, 6 May 2020 11:49:26 +0000
Message-ID: <CAOqdjBc+qQaiBMK9pAZbyMZm3nhVZdF4UHE15My01ivfOZ9F0A@HIDDEN>
Subject: Re: bug#40968: 28.0.50; (apply nil)
To: Stefan Kangas <stefan@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Wed, May 6, 2020 at 11:24 AM Stefan Kangas <stefan@HIDDEN> wrote:
> Pip Cet <pipcet@HIDDEN> writes:
> I have a feeling I'm missing something obvious here.  The current
> function signature is:
>
>    (apply FUNCTION &rest ARGUMENTS)
>
> How would your proposal change that?

(apply FUNCTION ARGUMENT &rest ARGUMENTS), I guess. I missed it in the
first patch.

Note that the old signature suggests (apply FUNCTION) is equivalent to
(funcall FUNCTION), which it isn't. (For example, that's what ElDoc
indicates the first argument to apply is).

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...




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 11:49:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 07:49:22 2020
Received: from localhost ([127.0.0.1]:38829 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWIYD-0004V0-Sq
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 07:49:22 -0400
Received: from mail76c50.megamailservers.eu ([91.136.10.86]:34526
 helo=mail70c50.megamailservers.eu)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattiase@HIDDEN>) id 1jWIYB-0004Up-1o
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 07:49:20 -0400
X-Authenticated-User: mattiase@HIDDEN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu;
 s=maildub; t=1588765757;
 bh=GhzeR3NS6zqnXL7sj8396Za23wq4JfuBePsRvPo1ExU=;
 h=Subject:From:In-Reply-To:Date:Cc:References:To:From;
 b=HRMi8hmNy6T+iviEBVw5vjyU1SHL2SjHQrf3CQJu4dVWPDGuNiSQXCvMLZO0gspc4
 DJ8Y4EnSX3H8tyxZTcCTPLPVxtrphr/DgCm1S51pgIiYg9p3UQwruLYEO/1poB9kSb
 rTIbaxkQKbmw8jkxaTvP1byge1VTKLSA+GMtWeBw=
Feedback-ID: mattiase@HIDDEN
Received: from stanniol.lan (c-4e4ae655.032-75-73746f71.bbcust.telenor.se
 [85.230.74.78]) (authenticated bits=0)
 by mail70c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 046BnEWo018076; 
 Wed, 6 May 2020 11:49:16 +0000
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\))
Subject: Re: bug#40968: 28.0.50; (apply nil)
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>
In-Reply-To: <CAOqdjBfu_jw-j2OdKt20RmvLP7StupcMH5Zxvmmzcb79C+UnAA@HIDDEN>
Date: Wed, 6 May 2020 13:49:13 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <7D86D2CE-F7AE-479E-84E0-B818A4A9016D@HIDDEN>
References: <69F27CB6-AB58-4E66-84FB-978278F7A757@HIDDEN>
 <CAOqdjBfu_jw-j2OdKt20RmvLP7StupcMH5Zxvmmzcb79C+UnAA@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
X-Mailer: Apple Mail (2.3445.104.14)
X-CTCH-RefID: str=0001.0A782F26.5EB2A3FA.001F, ss=1, re=0.000, recu=0.000,
 reip=0.000, cl=1, cld=1, fgs=0
X-CTCH-VOD: Unknown
X-CTCH-Spam: Unknown
X-CTCH-Score: 0.000
X-CTCH-Rules: 
X-CTCH-Flags: 0
X-CTCH-ScoreCust: 0.000
X-CSC: 0
X-CHA: v=2.3 cv=OKBZIhSB c=1 sm=1 tr=0 a=klNLuyVZdLUgl+K5Uafb2A==:117
 a=klNLuyVZdLUgl+K5Uafb2A==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10
 a=pGLkceISAAAA:8 a=4ItPzPCIdB-RUGPpUtoA:9 a=CjuIK1q_8ugA:10
X-Spam-Score: 1.4 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: 6 maj 2020 kl. 13.25 skrev Pip Cet <pipcet@HIDDEN>: > The
 obvious single-character patch results in four warnings when > rebuilding
 Emacs, all of which seem to use the previous semantics, so > I think it might
 be best to document this behavior and simp [...] 
 Content analysis details:   (1.4 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: megamailservers.eu]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [91.136.10.86 listed in wl.mailspike.net]
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.4 KHOP_HELO_FCRDNS       Relay HELO differs from its IP's reverse DNS
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org, Stefan Kangas <stefan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

6 maj 2020 kl. 13.25 skrev Pip Cet <pipcet@HIDDEN>:

> The obvious single-character patch results in four warnings when
> rebuilding Emacs, all of which seem to use the previous semantics, so
> I think it might be best to document this behavior and simply catch
> (apply nil).

There is one in cl-generic-tests.el, too.
It appears in one GNU ELPA package as well, and in one other external =
package where it seems to be a misunderstanding of apply:

(cl-defun nim-log (&rest msg-and-rest)
  (apply `((lambda () (lwarn 'nim :debug ,@msg-and-rest)))))






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 11:26:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 07:26:03 2020
Received: from localhost ([127.0.0.1]:38751 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWIBf-0001mg-Jn
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 07:26:03 -0400
Received: from mail-oi1-f194.google.com ([209.85.167.194]:45391)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jWIBd-0001m5-Ks
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 07:26:02 -0400
Received: by mail-oi1-f194.google.com with SMTP id k133so1174475oih.12
 for <40968 <at> debbugs.gnu.org>; Wed, 06 May 2020 04:26:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=uEkhzfa4tHZ7MhGcLhcq4HC9eIC/WkqYi8A3WT73Puk=;
 b=tAsXNIuRdNIA4L1R9Y8dWlj4q3SxBze6RQxiP3L6hADClMRJv5pm2qoGdPzs1AfCkB
 vNbBqc2qaC9mxf25sQcOUd2BDJTNl1jIaMAekxsWITw5j3C5tDD5zmDggDXL1YYzMiHw
 YtRgkp5lVR0YC1Wf8Ol2UX1TP7vOktpLmsS9Yzsrv0jbvsEE3XoUWVVvhO3TbrAIrVQA
 1goxnzuC6qGqT9MNSfP52/nmGQBa125LtZvFPhVd34LYYezrXInq2i53Q/xr7TQmROOF
 QvbF8Sv3iPgalL+53vlL0ptekhHCACfH9olHkq1sOIwPNgfkeY91/zMxMBpp2f8l3A0g
 zwkw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=uEkhzfa4tHZ7MhGcLhcq4HC9eIC/WkqYi8A3WT73Puk=;
 b=f0vZDNQXI/OZmTocDtbe5KC4VX7Vv622D5JxO2TxjyVvleeNOMnCI+6o05hHxrG6jn
 VyGFcqkeDPU+nnXlGh8ctdNMjj1qjf/HtXk1dZ9pa2+msmaYK8K8Q28Pew4iibcaHbLY
 WNcH2ZtDe4DtuDI5hq38VPS2fUASyllTVkESl4pk1shb4IFUMiw3ZtVqonzL5rbcTq6r
 HSl2nwnMBZ+wZX3I4LQi7U8v2WZRHDFgGhKPOnFnF3EZYM162ohh1SfMBMZEjPLim+7q
 XDafbqgx4Mnyo3ZnY8hdjKxKH7YzRF7eeMMxmxYXgg7cTopKhJz6fPGYzi3wltYfxipW
 wzZA==
X-Gm-Message-State: AGi0PuZOiL7gPVbWV9DQ0/31qxDxK0Zn17k7XSazTLmNXQALMYpaPJdk
 /vJC7ROTcf7XZ15OvuS/Y1rSf17LRvFyZGd+cFg=
X-Google-Smtp-Source: APiQypJgjQ5IQm4Ew1BjcE88F9E8kwvoHudgZQZzhrOQSuarWe4d6MgGfC8j/s4H1A8WFsyfuJsjR6VOqE79MrQq2Io=
X-Received: by 2002:aca:5614:: with SMTP id k20mr2322307oib.30.1588764356072; 
 Wed, 06 May 2020 04:25:56 -0700 (PDT)
MIME-Version: 1.0
References: <69F27CB6-AB58-4E66-84FB-978278F7A757@HIDDEN>
In-Reply-To: <69F27CB6-AB58-4E66-84FB-978278F7A757@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Wed, 6 May 2020 11:25:19 +0000
Message-ID: <CAOqdjBfu_jw-j2OdKt20RmvLP7StupcMH5Zxvmmzcb79C+UnAA@HIDDEN>
Subject: Re: bug#40968: 28.0.50; (apply nil)
To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>
Content-Type: multipart/mixed; boundary="000000000000136f1b05a4f90760"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org, Stefan Kangas <stefan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000136f1b05a4f90760
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Wed, May 6, 2020 at 10:18 AM Mattias Engdeg=C3=A5rd <mattiase@HIDDEN> w=
rote:
> > The byte compiler also gets single-argument `apply' "wrong", so the lat=
ter would seem to be the best option, to me.
>
> Strong agreement! An 'apply' that actually does 'eval'...

Well, it's not quite `eval': the arguments aren't evaluated again.

The obvious single-character patch results in four warnings when
rebuilding Emacs, all of which seem to use the previous semantics, so
I think it might be best to document this behavior and simply catch
(apply nil).

--000000000000136f1b05a4f90760
Content-Type: text/x-patch; charset="US-ASCII"; 
	name="0001-Require-at-least-two-arguments-for-Fapply.patch"
Content-Disposition: attachment; 
	filename="0001-Require-at-least-two-arguments-for-Fapply.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_k9v98lr10>
X-Attachment-Id: f_k9v98lr10

RnJvbSA4OThhZjM5NGZjYmRlNTdjYTNkMDhlMzY0OGI2MmZlMGIzZjQxOTExIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBQaXAgQ2V0IDxwaXBjZXRAZ21haWwuY29tPgpEYXRlOiBXZWQs
IDYgTWF5IDIwMjAgMTE6MDg6MjkgKzAwMDAKU3ViamVjdDogW1BBVENIXSBSZXF1aXJlIGF0IGxl
YXN0IHR3byBhcmd1bWVudHMgZm9yIEZhcHBseQoKKiBzcmMvZXZhbC5jIChGYXBwbHkpOiBSZXF1
aXJlIGF0IGxlYXN0IHR3byBhcmd1bWVudHMsIHRvIHByZXZlbnQKY3Jhc2hlcyB3aGVuIChhcHBs
eSBuaWwpIGlzIGV2YWx1YXRlZC4KKiBsaXNwL3Byb2dtb2Rlcy9lYnJvd3NlLmVsIChlYnJvd3Nl
LXRhZ3MtbG9vcC1jb250aW51ZSk6IFByb3ZpZGUgdHdvCmFyZ3VtZW50cyB0byBgYXBwbHknLgoq
IGxpc3Avc3ZnLmVsIChzdmctLWV2YWwtcGF0aC1jb21tYW5kKTogUHJvdmlkZSB0d28gYXJndW1l
bnRzIHRvCmBhcHBseScuCiogbGlzcC9zaW1wbGUuZWwgKHByaW1pdGl2ZS11bmRvKTogUHJvdmlk
ZSB0d28gYXJndW1lbnRzIHRvIGBhcHBseScuCi0tLQogbGlzcC9uZXQvdGVsbmV0LmVsICAgICAg
ICB8IDMgKystCiBsaXNwL3Byb2dtb2Rlcy9lYnJvd3NlLmVsIHwgMyArKy0KIGxpc3Avc2ltcGxl
LmVsICAgICAgICAgICAgfCAyICstCiBsaXNwL3N2Zy5lbCAgICAgICAgICAgICAgIHwgMyArKy0K
IHNyYy9ldmFsLmMgICAgICAgICAgICAgICAgfCAyICstCiA1IGZpbGVzIGNoYW5nZWQsIDggaW5z
ZXJ0aW9ucygrKSwgNSBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9saXNwL25ldC90ZWxuZXQu
ZWwgYi9saXNwL25ldC90ZWxuZXQuZWwKaW5kZXggZThjMGMxYmJkZi4uYjAzNTBlYWNiZiAxMDA2
NDQKLS0tIGEvbGlzcC9uZXQvdGVsbmV0LmVsCisrKyBiL2xpc3AvbmV0L3RlbG5ldC5lbApAQCAt
MTA5LDcgKzEwOSw4IEBAIHRlbG5ldC1yZXZlcnQtYnVmZmVyCiAgICAgICAgIChyZXZlcnQtYnVm
ZmVyIGlnbm9yZS1hdXRvIG5vY29uZmlybSkpCiAgICAgKGlmIChvciBub2NvbmZpcm0KICAgICAg
ICAgICAgICh5ZXMtb3Itbm8tcCAoZm9ybWF0ICJSZXN0YXJ0IGNvbm5lY3Rpb24/ICIpKSkKLSAg
ICAgICAgKGFwcGx5IHRlbG5ldC1jb25uZWN0LWNvbW1hbmQpKSkpCisgICAgICAgIChhcHBseSAo
Y2FyIHRlbG5ldC1jb25uZWN0LWNvbW1hbmQpCisgICAgICAgICAgICAgICAoY2RyIHRlbG5ldC1j
b25uZWN0LWNvbW1hbmQpKSkpKQogCiAoZGVmdW4gdGVsbmV0LWMteiAoKQogICAoaW50ZXJhY3Rp
dmUpCmRpZmYgLS1naXQgYS9saXNwL3Byb2dtb2Rlcy9lYnJvd3NlLmVsIGIvbGlzcC9wcm9nbW9k
ZXMvZWJyb3dzZS5lbAppbmRleCAxYzllODA1ZjAzLi5mMDUyMjY2YjFhIDEwMDY0NAotLS0gYS9s
aXNwL3Byb2dtb2Rlcy9lYnJvd3NlLmVsCisrKyBiL2xpc3AvcHJvZ21vZGVzL2Vicm93c2UuZWwK
QEAgLTM2MTIsNyArMzYxMiw4IEBAIGVicm93c2UtdGFncy1sb29wLWNvbnRpbnVlCiAgICh3aGVu
IGZpcnN0LXRpbWUKICAgICAoZWJyb3dzZS10YWdzLW5leHQtZmlsZSBmaXJzdC10aW1lIHRyZWUt
YnVmZmVyKQogICAgIChnb3RvLWNoYXIgKHBvaW50LW1pbikpKQotICAod2hpbGUgKG5vdCAoYXBw
bHkgZWJyb3dzZS10YWdzLWxvb3AtY2FsbCkpCisgICh3aGlsZSAobm90IChhcHBseSAoY2FyIGVi
cm93c2UtdGFncy1sb29wLWNhbGwpCisgICAgICAgICAgICAgICAgICAgICAoY2RyIGVicm93c2Ut
dGFncy1sb29wLWNhbGwpKSkKICAgICAoZWJyb3dzZS10YWdzLW5leHQtZmlsZSkKICAgICAobWVz
c2FnZSAiU2Nhbm5pbmcgZmlsZSBgJXMnLi4uIiBidWZmZXItZmlsZS1uYW1lKQogICAgIChnb3Rv
LWNoYXIgKHBvaW50LW1pbikpKSkKZGlmZiAtLWdpdCBhL2xpc3Avc2ltcGxlLmVsIGIvbGlzcC9z
aW1wbGUuZWwKaW5kZXggYjViYTA1NDI2Zi4uOWE5NmNlMDAxMyAxMDA2NDQKLS0tIGEvbGlzcC9z
aW1wbGUuZWwKKysrIGIvbGlzcC9zaW1wbGUuZWwKQEAgLTI3NzgsNyArMjc3OCw3IEBAIHByaW1p
dGl2ZS11bmRvCiAgICAgICAgICAgICAgICAgICAgICAoZXJyb3IgIkNoYW5nZXMgdG8gYmUgdW5k
b25lIGJ5IGZ1bmN0aW9uIGRpZmZlcmVudCBmcm9tIGFubm91bmNlZCIpKQogICAgICAgICAgICAg
ICAgICAgIChzZXQtbWFya2VyIHN0YXJ0LW1hcmsgbmlsKQogICAgICAgICAgICAgICAgICAgIChz
ZXQtbWFya2VyIGVuZC1tYXJrIG5pbCkpCi0gICAgICAgICAgICAgICAoYXBwbHkgZnVuLWFyZ3Mp
KQorICAgICAgICAgICAgICAgKGFwcGx5IChjYXIgZnVuLWFyZ3MpIChjZHIgZnVuLWFyZ3MpKSkK
ICAgICAgICAgICAgICAodW5sZXNzIChlcSBjdXJyYnVmZiAoY3VycmVudC1idWZmZXIpKQogICAg
ICAgICAgICAgICAgKGVycm9yICJVbmRvIGZ1bmN0aW9uIHN3aXRjaGVkIGJ1ZmZlciIpKQogICAg
ICAgICAgICAgIChzZXRxIGRpZC1hcHBseSB0KSkpCmRpZmYgLS1naXQgYS9saXNwL3N2Zy5lbCBi
L2xpc3Avc3ZnLmVsCmluZGV4IDdhYWRiYzIzNTkuLjk4MmUyYjA5NjUgMTAwNjQ0Ci0tLSBhL2xp
c3Avc3ZnLmVsCisrKyBiL2xpc3Avc3ZnLmVsCkBAIC00MzcsNyArNDM3LDggQEAgc3ZnLS1ldmFs
LXBhdGgtY29tbWFuZAogICAgICAgICAjJ3N2Zy0tZWxsaXB0aWNhbC1hcmMtY29tbWFuZCkKICAg
ICAgICAoZXh0ZW5kZWQtY29tbWFuZCAoYXBwZW5kIGNvbW1hbmQgKGxpc3QgOmRlZmF1bHQtcmVs
YXRpdmUKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVm
YXVsdC1yZWxhdGl2ZSkpKSkKLSAgICAobWFwY29uY2F0ICdwcmluMS10by1zdHJpbmcgKGFwcGx5
IGV4dGVuZGVkLWNvbW1hbmQpICIgIikpKQorICAgIChtYXBjb25jYXQgJ3ByaW4xLXRvLXN0cmlu
ZyAoYXBwbHkgKGNhciBleHRlbmRlZC1jb21tYW5kKQorICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgKGNkciBleHRlbmRlZC1jb21tYW5kKSkgIiAiKSkpCiAKIChkZWZ1biBz
dmctcGF0aCAoc3ZnIGNvbW1hbmRzICZyZXN0IGFyZ3MpCiAgICJBZGQgdGhlIG91dGxpbmUgb2Yg
YSBzaGFwZSB0byBTVkcgYWNjb3JkaW5nIHRvIENPTU1BTkRTLgpkaWZmIC0tZ2l0IGEvc3JjL2V2
YWwuYyBiL3NyYy9ldmFsLmMKaW5kZXggMDE0OTA1Y2U2ZC4uMWI5ZmQ5MDQ4MiAxMDA2NDQKLS0t
IGEvc3JjL2V2YWwuYworKysgYi9zcmMvZXZhbC5jCkBAIC0yMzU4LDcgKzIzNTgsNyBAQCBldmFs
X3N1YiAoTGlzcF9PYmplY3QgZm9ybSkKICAgcmV0dXJuIHZhbDsKIH0KIAwKLURFRlVOICgiYXBw
bHkiLCBGYXBwbHksIFNhcHBseSwgMSwgTUFOWSwgMCwKK0RFRlVOICgiYXBwbHkiLCBGYXBwbHks
IFNhcHBseSwgMiwgTUFOWSwgMCwKICAgICAgICBkb2M6IC8qIENhbGwgRlVOQ1RJT04gd2l0aCBv
dXIgcmVtYWluaW5nIGFyZ3MsIHVzaW5nIG91ciBsYXN0IGFyZyBhcyBsaXN0IG9mIGFyZ3MuCiBU
aGVuIHJldHVybiB0aGUgdmFsdWUgRlVOQ1RJT04gcmV0dXJucy4KIFRodXMsIChhcHBseSBcXD0n
KyAxIDIgXFw9JygzIDQpKSByZXR1cm5zIDEwLgotLSAKMi4yNi4yCgo=
--000000000000136f1b05a4f90760--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 11:24:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 07:24:21 2020
Received: from localhost ([127.0.0.1]:38733 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWIA1-0001j8-KV
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 07:24:21 -0400
Received: from mail-yb1-f180.google.com ([209.85.219.180]:34553)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1jWI9z-0001ij-BY
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 07:24:20 -0400
Received: by mail-yb1-f180.google.com with SMTP id q206so810528ybg.1
 for <40968 <at> debbugs.gnu.org>; Wed, 06 May 2020 04:24:19 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:in-reply-to:references:mime-version:date
 :message-id:subject:to:cc;
 bh=Qe407thnZL71Ihake5CzaYyajzjqNsbRVgTG8iSjIPA=;
 b=RP1n4U8wD9+1pYkUP5kfIYTbgsby4wyOB1LsYHCO7yFAsfZ+qaOScEI2YlEqZC1VZG
 vjKFCXRwAE0Dnhao6PbT+okkZuijB9lJiw3SUZpLWmjB8FNNG3LjNRuoUzHKqSsdbfPR
 VNyqh7R+8/RzMvpgCIQGmj3cndY7vPmigNxWjUX6pQc8W3iQkYsHOVqX32V7YWtFEk1J
 z2m66UFZ7m5uCVVCye2gr3/+1IVSCKYXOhO6TITP0cyb8Zm/we3LuW5k2TfKasebn1VH
 ZSu0rEP79OyynPqjm3U5KH2/2tcKrr5Rpc4MB+lQ+h6YeJhJi3ojJjZ6FJPT2noTJQN7
 eoLw==
X-Gm-Message-State: AGi0Pubj4QG2QLyaUViWR6wA3GuPpr3nQSdt5+/Vm8OVeipUneusLZM4
 EzNNzM9i3aOPrqvfOoTBzKEbF7TIfsYujHYmABc=
X-Google-Smtp-Source: APiQypLxdITlTYXnA2fkoDvbopUc18uPZtfmYrpOSf8zwOb35PoJj4BRrdmI0upNE7f3irIrnNVLklR5GplDtcf71NY=
X-Received: by 2002:a25:e907:: with SMTP id n7mr12407942ybd.85.1588764253758; 
 Wed, 06 May 2020 04:24:13 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Wed, 6 May 2020 07:24:13 -0400
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <CAOqdjBcxGpHxSPS4rLGAbS06Q_QjUMPz1GMae+neEGENNEEHPA@HIDDEN>
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
 <CAOqdjBcxGpHxSPS4rLGAbS06Q_QjUMPz1GMae+neEGENNEEHPA@HIDDEN>
MIME-Version: 1.0
Date: Wed, 6 May 2020 07:24:13 -0400
Message-ID: <CADwFkm=TZ6O3Wocst8E047g4VAFu3n8MaVL1ZQSEopMkxkTkfw@HIDDEN>
Subject: Re: bug#40968: 28.0.50; (apply nil)
To: Pip Cet <pipcet@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Pip Cet <pipcet@HIDDEN> writes:

> Thanks. I disagree that it would be harder to understand, though: "the
> first argument is a function to call, the last argument is a list of
> arguments" is easy to understand when there are >= 2 arguments, but
> for a single argument they're in contradiction, aren't they? Indeed,
> I'd read Fapply's current docstring:

I have a feeling I'm missing something obvious here.  The current
function signature is:

   (apply FUNCTION &rest ARGUMENTS)

How would your proposal change that?

Best regards,
Stefan Kangas




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 10:58:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 06:58:04 2020
Received: from localhost ([127.0.0.1]:38659 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWHka-0000zF-OW
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 06:58:04 -0400
Received: from mail-out.m-online.net ([212.18.0.10]:51409)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <whitebox@HIDDEN>) id 1jWHkY-0000yv-Kd
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 06:58:03 -0400
Received: from frontend01.mail.m-online.net (unknown [192.168.8.182])
 by mail-out.m-online.net (Postfix) with ESMTP id 49HD8S4yT4z1rxwG;
 Wed,  6 May 2020 12:58:00 +0200 (CEST)
Received: from localhost (dynscan1.mnet-online.de [192.168.6.70])
 by mail.m-online.net (Postfix) with ESMTP id 49HD8S2KdYz1qv7j;
 Wed,  6 May 2020 12:58:00 +0200 (CEST)
X-Virus-Scanned: amavisd-new at mnet-online.de
Received: from mail.mnet-online.de ([192.168.8.182])
 by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new,
 port 10024)
 with ESMTP id CH2WjkLRoJwd; Wed,  6 May 2020 12:57:59 +0200 (CEST)
X-Auth-Info: ibySsLlqDB5oBj0cMqfrpW1BfRSEerwR7oJ14HBgUWbvgWPkwv2iAsEdAHohALmZ
Received: from igel.home (ppp-46-244-183-249.dynamic.mnet-online.de
 [46.244.183.249])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mail.mnet-online.de (Postfix) with ESMTPSA;
 Wed,  6 May 2020 12:57:59 +0200 (CEST)
Received: by igel.home (Postfix, from userid 1000)
 id BDDE82C0D4E; Wed,  6 May 2020 12:57:58 +0200 (CEST)
From: Andreas Schwab <schwab@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#40968: 28.0.50; (apply nil)
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <69F27CB6-AB58-4E66-84FB-978278F7A757@HIDDEN>
 <DB1BCDE8-911D-4B04-B1AA-C7A57163272F@HIDDEN>
X-Yow: I'm reporting for duty as a modern person.  I want to do
 the Latin Hustle now!
Date: Wed, 06 May 2020 12:57:58 +0200
In-Reply-To: <DB1BCDE8-911D-4B04-B1AA-C7A57163272F@HIDDEN> (Eli Zaretskii's
 message of "Wed, 06 May 2020 13:45:51 +0300")
Message-ID: <87y2q572kp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.4 (/)
X-Debbugs-Envelope-To: 40968
Cc: mattiase@HIDDEN, stefan@HIDDEN, 40968 <at> debbugs.gnu.org, rms@HIDDEN,
 pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.4 (-)

On Mai 06 2020, Eli Zaretskii wrote:

> Hmm... but Fapply clearly attempts to handle the case of zero
> arguments.

I don't think it does.  It handles (apply ... nil) (numargs is the
length of the last argument), but mishandles the boundary case (when
nargs is one).

Andreas.

-- 
Andreas Schwab, schwab@HIDDEN
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 10:46:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 06:46:20 2020
Received: from localhost ([127.0.0.1]:38650 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWHZE-0000gO-Bo
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 06:46:20 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34838)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jWHZ2-0000fg-7H
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 06:46:09 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52422)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jWHYw-0001DA-Gz; Wed, 06 May 2020 06:46:02 -0400
Received: from [176.12.151.155] (port=55162 helo=[10.161.128.100])
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jWHYo-0006yv-8G; Wed, 06 May 2020 06:45:54 -0400
Date: Wed, 06 May 2020 13:45:51 +0300
User-Agent: K-9 Mail for Android
In-Reply-To: <69F27CB6-AB58-4E66-84FB-978278F7A757@HIDDEN>
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <69F27CB6-AB58-4E66-84FB-978278F7A757@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
Subject: Re: bug#40968: 28.0.50; (apply nil)
To: bug-gnu-emacs@HIDDEN,
 =?ISO-8859-1?Q?Mattias_Engdeg=E5rd?= <mattiase@HIDDEN>,
 Pip Cet <pipcet@HIDDEN>, "Richard M. Stallman" <rms@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
Message-ID: <DB1BCDE8-911D-4B04-B1AA-C7A57163272F@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org, Stefan Kangas <stefan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On May 6, 2020 1:18:44 PM GMT+03:00, "Mattias Engdeg=C3=A5rd" <mattiase@acm=
=2Eorg> wrote:
> > The byte compiler also gets single-argument `apply' "wrong", so the
> latter would seem to be the best option, to me=2E=20
>=20
> Strong agreement! An 'apply' that actually does 'eval'=2E=2E=2E
> Will you write the patch or shall I?

Hmm=2E=2E=2E but Fapply clearly attempts to handle the case of zero argume=
nts=2E  Richard  do you remember what use cases was that supposed to handle=
?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 May 2020 10:46:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 06:46:20 2020
Received: from localhost ([127.0.0.1]:38648 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWHZ3-0000g2-DV
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 06:46:20 -0400
Received: from lists.gnu.org ([209.51.188.17]:52518)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jWHYx-0000fk-Eh
 for submit <at> debbugs.gnu.org; Wed, 06 May 2020 06:46:06 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:37810)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1jWHYx-0000kR-5j
 for bug-gnu-emacs@HIDDEN; Wed, 06 May 2020 06:46:03 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52422)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jWHYw-0001DA-Gz; Wed, 06 May 2020 06:46:02 -0400
Received: from [176.12.151.155] (port=55162 helo=[10.161.128.100])
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jWHYo-0006yv-8G; Wed, 06 May 2020 06:45:54 -0400
Date: Wed, 06 May 2020 13:45:51 +0300
User-Agent: K-9 Mail for Android
In-Reply-To: <69F27CB6-AB58-4E66-84FB-978278F7A757@HIDDEN>
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <69F27CB6-AB58-4E66-84FB-978278F7A757@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
Subject: Re: bug#40968: 28.0.50; (apply nil)
To: bug-gnu-emacs@HIDDEN,
 =?ISO-8859-1?Q?Mattias_Engdeg=E5rd?= <mattiase@HIDDEN>,
 Pip Cet <pipcet@HIDDEN>, "Richard M. Stallman" <rms@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
Message-ID: <DB1BCDE8-911D-4B04-B1AA-C7A57163272F@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
Cc: 40968 <at> debbugs.gnu.org, Stefan Kangas <stefan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On May 6, 2020 1:18:44 PM GMT+03:00, "Mattias Engdeg=C3=A5rd" <mattiase@acm=
=2Eorg> wrote:
> > The byte compiler also gets single-argument `apply' "wrong", so the
> latter would seem to be the best option, to me=2E=20
>=20
> Strong agreement! An 'apply' that actually does 'eval'=2E=2E=2E
> Will you write the patch or shall I?

Hmm=2E=2E=2E but Fapply clearly attempts to handle the case of zero argume=
nts=2E  Richard  do you remember what use cases was that supposed to handle=
?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 10:19:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 06:19:00 2020
Received: from localhost ([127.0.0.1]:38593 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWH8m-0008Ma-7H
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 06:19:00 -0400
Received: from mail227c50.megamailservers.eu ([91.136.10.237]:50440
 helo=mail36c50.megamailservers.eu)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattiase@HIDDEN>) id 1jWH8e-0008MJ-1h
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 06:18:58 -0400
X-Authenticated-User: mattiase@HIDDEN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu;
 s=maildub; t=1588760327;
 bh=9/ttqYoIiwv7PvaTcKNdH50urHAc2ad74LVBsz/tzjQ=;
 h=From:Subject:Date:Cc:To:From;
 b=dY5TGbpxqbay/g+XgfvjANzW4ByXrx431atXUXK7W/F/qS+m6zpFi+ma1Q3Fibaia
 mb6csggn/6b906p+1waQ6FXLy46v0sITma2Q2BCGfxBa46wdFmnvxTwFcu/zeo9nUL
 pb3E9Ir4p8Cj9y0/WFiFL6Blsijl9Pgbe74eP/yU=
Feedback-ID: mattiase@HIDDEN
Received: from stanniol.lan (c-4e4ae655.032-75-73746f71.bbcust.telenor.se
 [85.230.74.78]) (authenticated bits=0)
 by mail36c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 046AIi8A014015; 
 Wed, 6 May 2020 10:18:46 +0000
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>
Content-Type: text/plain;
	charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\))
Subject: Re: bug#40968: 28.0.50; (apply nil) 
Message-Id: <69F27CB6-AB58-4E66-84FB-978278F7A757@HIDDEN>
Date: Wed, 6 May 2020 12:18:44 +0200
To: Pip Cet <pipcet@HIDDEN>
X-Mailer: Apple Mail (2.3445.104.14)
X-CTCH-RefID: str=0001.0A782F26.5EB28EC4.0092, ss=1, re=0.000, recu=0.000,
 reip=0.000, cl=1, cld=1, fgs=0
X-CTCH-VOD: Unknown
X-CTCH-Spam: Unknown
X-CTCH-Score: 0.000
X-CTCH-Rules: 
X-CTCH-Flags: 0
X-CTCH-ScoreCust: 0.000
X-CSC: 0
X-CHA: v=2.3 cv=PeiBeRpd c=1 sm=1 tr=0 a=klNLuyVZdLUgl+K5Uafb2A==:117
 a=klNLuyVZdLUgl+K5Uafb2A==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10
 a=6jRdl2Vi5790jQPiMSMA:9 a=CjuIK1q_8ugA:10
X-Spam-Score: 1.4 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: > The byte compiler also gets single-argument `apply' "wrong",
 so the latter would seem to be the best option, to me. Strong agreement!
 An 'apply' that actually does 'eval'... Will you write the patch or shall
 I? Content analysis details:   (1.4 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: megamailservers.eu]
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.4 KHOP_HELO_FCRDNS       Relay HELO differs from its IP's reverse DNS
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org, Stefan Kangas <stefan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

> The byte compiler also gets single-argument `apply' "wrong", so the =
latter would seem to be the best option, to me.=20

Strong agreement! An 'apply' that actually does 'eval'...
Will you write the patch or shall I?





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 07:27:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 03:27:20 2020
Received: from localhost ([127.0.0.1]:38421 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWESe-0001yc-G2
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 03:27:20 -0400
Received: from mail-oo1-f44.google.com ([209.85.161.44]:34187)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jWESc-0001yM-Ri
 for 40968 <at> debbugs.gnu.org; Wed, 06 May 2020 03:27:19 -0400
Received: by mail-oo1-f44.google.com with SMTP id q204so288145ooq.1
 for <40968 <at> debbugs.gnu.org>; Wed, 06 May 2020 00:27:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=0IicQivKJAJltDFn4w/hV1KxrsKMA3xPzakDe1+AmXA=;
 b=JbvR/0xWrO9Ns0/uW0RdFrUYgY8A8JHdMhKZZwwIld99ocviwcEmfDkm1RGs89zea1
 bv+4Wq+QYo58gcQWLdBxBVDjGT2ipv4RTHydVnWOvJOawUj4NEkeexITjkdhLKiJIy0C
 MfEn1rg4hXyRIpSxdwgzJlz3ID5xehQ+uUvlJrkeiB4ZrJJY63M0Gr3t9nad0ZTBxDBr
 7fc8HCrPN2jRam8CEy8cnvpW12EX45G8Q2ri8n/qvILe08Jd+7PqI/oZ406cUrMaxjs0
 ughQkYU7xcxY//eILaVu57tNz1gugA2umhUW2uT8RDEjfzHAG2CGVcnAfCobHUexAGts
 QJhg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=0IicQivKJAJltDFn4w/hV1KxrsKMA3xPzakDe1+AmXA=;
 b=tImLTb7DT+0hJ7fgaHgXVJD0hv6b18v1DhPxxbiGpAwwpXJKPVb+a3D+Wn/iraetaP
 LvHKa3Mivt1YF114DMc6vMcnAFa+DXvuQOD0bZfQ84kZ+3N48n2sOtxAuUtzsNCcskgY
 hlPfXPfWqiBs29ahlJHGxd7qLf2w5DwJo0weJI20K+3wgbBvfVUkYiHFErhdyRIkX2+0
 oUCkbOiDzbHojX84ITgUpyIeQhS7JKr7NNQXhrxkyi8trgAXz5qV9oyT2AQ1kU2wwy4x
 tyYqVQgQFPRdIYdPfu12PZnA0KMQMaPSuufrV6VLYXTRZT0ljooa8rmfYxAQU5SyGoO4
 b3kA==
X-Gm-Message-State: AGi0Puaq1vKX2re4bV/q1ikmXWugGyqEENbtk4drpfmmNOGd8oCPdkr0
 qgp54Jk9PgyBglLlrQ7Kq8aG883NswF0gOc3uHxOFhHWDpA=
X-Google-Smtp-Source: APiQypKfgSevJ5o3j5cd1Ff1tWQb/gQjH1+woRgzaE3vcnuPS3nBgBrwg4iGn73RhYieBk/5cnvGlMBFlSTmkPB8sWU=
X-Received: by 2002:a4a:ba0b:: with SMTP id b11mr6235711oop.44.1588750033118; 
 Wed, 06 May 2020 00:27:13 -0700 (PDT)
MIME-Version: 1.0
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
In-Reply-To: <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Wed, 6 May 2020 07:26:36 +0000
Message-ID: <CAOqdjBcxGpHxSPS4rLGAbS06Q_QjUMPz1GMae+neEGENNEEHPA@HIDDEN>
Subject: Re: bug#40968: 28.0.50; (apply nil)
To: Stefan Kangas <stefan@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Wed, May 6, 2020 at 1:51 AM Stefan Kangas <stefan@HIDDEN> wrote:
> Pip Cet <pipcet@HIDDEN> writes:
> > I'm very confused by the behavior of `apply' when given only a single
> > argument: when it's a nonempty list, the argument gets spread out and
> > passed to Ffuncall (I guess this might be useful sometimes). When it's
> > nil, Ffuncall gets called with nargs == 0 and Emacs crashes, at least
> > sometimes.
> >
> > Should we fix the special case or raise apply's minimum argument count to 2?
>
> I'm personally not a big fan of raising the minimum argument count,
> thereby changing the function signature and making it harder to
> understand.

Thanks. I disagree that it would be harder to understand, though: "the
first argument is a function to call, the last argument is a list of
arguments" is easy to understand when there are >= 2 arguments, but
for a single argument they're in contradiction, aren't they? Indeed,
I'd read Fapply's current docstring:

Call FUNCTION with our remaining args, using our last arg as list of args.

as implying that (apply FUNCTION) is equivalent to (funcall FUNCTION)

> We should just fix the bug, IMHO.

I don't think we can "just" fix the bug. We need to fix Fapply, change
the byte compiler to accept single-argument apply, reformulate the
docstring to describe this case, and probably fix the Lisp manual as
well. I don't think all that is worth it, to be honest, to save
someone the trouble of having to write (apply (car LIST) (cdr LIST))
rather than (apply LIST) (if that is, indeed, what they meant).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 6 May 2020 01:51:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 05 21:51:19 2020
Received: from localhost ([127.0.0.1]:37982 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jW9DT-0005yc-Mv
	for submit <at> debbugs.gnu.org; Tue, 05 May 2020 21:51:19 -0400
Received: from mail-yb1-f170.google.com ([209.85.219.170]:35280)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1jW9DR-0005yH-Bi
 for 40968 <at> debbugs.gnu.org; Tue, 05 May 2020 21:51:17 -0400
Received: by mail-yb1-f170.google.com with SMTP id d128so168500ybb.2
 for <40968 <at> debbugs.gnu.org>; Tue, 05 May 2020 18:51:17 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:in-reply-to:references:user-agent
 :mime-version:date:message-id:subject:to:cc;
 bh=2Hw5VCec8FyQpBcHGoBKuPkY336Ezj7UdLrbEnFNSdE=;
 b=kcUy5G2Lys5lVImPLHekDRZUBG9FFd2QDzbg6u/M9NhzOyebfLHUYNxTAroP4x7CmJ
 HPe838ZeLAC0XnpDS3Q0Hm3+Fu2Miqc7cFVwQLMnvOanOvF5ANimpxANt/wti6gJOAqu
 viKu4P/2dvGfvmvSgAcA9eum6LATafkh8pHKFTSsyr8M0HkRZrLsn3HqgPl1rGsLVwsR
 Pbfxl0jj4FQlxHezSpiwtpyyfB52KX3f+LqL2rkPyTVsOve344RPv5PTRL08YsaQQnPT
 wXby07akh0qe4nYNdwlemLQmx3tBeX8PWI5dU2ACksjLpDhEJXcD/IKAAx2SM5c1eGjK
 JpTQ==
X-Gm-Message-State: AGi0PuZaMJ5QA3uaAeJ3e/0tLkTRpViYxLEYd0G4ZZ9EHM3DffMxMznI
 qNIbmaQUr/MwLkQuRAWxSB9efZbZJU82sHmOMjg=
X-Google-Smtp-Source: APiQypKlE+tMozxG/1MT2OSmQutyeu5po3nn/WUTk/r8if0TYdr+46WM+lYqWJVnGMzqNXE8vGhY81QH40QvE1skoSE=
X-Received: by 2002:a25:fc08:: with SMTP id v8mr9851635ybd.389.1588729871642; 
 Tue, 05 May 2020 18:51:11 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Tue, 5 May 2020 21:51:11 -0400
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
 (Pip Cet's message of "Wed, 29 Apr 2020 18:26:15 +0000")
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Date: Tue, 5 May 2020 21:51:11 -0400
Message-ID: <CADwFkmkWqy5s88q-UKCcBHmWFtNq=GC5x3ELfnUc6jc7njWfwQ@HIDDEN>
Subject: Re: bug#40968: 28.0.50; (apply nil)
To: Pip Cet <pipcet@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 40968
Cc: 40968 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Pip Cet <pipcet@HIDDEN> writes:

> I'm very confused by the behavior of `apply' when given only a single
> argument: when it's a nonempty list, the argument gets spread out and
> passed to Ffuncall (I guess this might be useful sometimes). When it's
> nil, Ffuncall gets called with nargs == 0 and Emacs crashes, at least
> sometimes.
>
> Should we fix the special case or raise apply's minimum argument count to 2?

I'm personally not a big fan of raising the minimum argument count,
thereby changing the function signature and making it harder to
understand.

We should just fix the bug, IMHO.

Best regards,
Stefan Kangas




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at 40968 <at> debbugs.gnu.org:


Received: (at 40968) by debbugs.gnu.org; 29 Apr 2020 18:36:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 29 14:36:26 2020
Received: from localhost ([127.0.0.1]:44567 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jTrZK-0003X7-FT
	for submit <at> debbugs.gnu.org; Wed, 29 Apr 2020 14:36:26 -0400
Received: from mail-ot1-f52.google.com ([209.85.210.52]:45406)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jTrZI-0003Wr-E7
 for 40968 <at> debbugs.gnu.org; Wed, 29 Apr 2020 14:36:24 -0400
Received: by mail-ot1-f52.google.com with SMTP id e20so2567334otk.12
 for <40968 <at> debbugs.gnu.org>; Wed, 29 Apr 2020 11:36:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
 bh=1nCC1pVCpo6a1FBtaf21dUN0TQ+qxWr9csbUN83atYg=;
 b=GgoO/17CfCBDz9WNEv807UJ6BKBMj0CxYBGBmDxYE1oGv4VleBnU7p6Xd89pCbvcrN
 OG9hr5/vCdkqlJ/OI0wN6hb77tAUsM2i24asznCyUlqoZulo8sntrOGwPxsY8g4jhJ1v
 KD9u4UVE8zcmp0IcANrn2Z6LbgI/D5d+TRDUprAE86932M5Fw/ahNfPIAYNu+1HMLyIz
 2FYCXBWvDYnI5GqSCwTSJ/xfV0rzrKQx4iAF8xTGQMNZOghlF0gcJ1h3ZYBBT39fE5Rn
 XrOVgmKRTVB0S4Mms1PKU+qGlhOt9BhR1zM0N/f8kMz4iHMPAj+jIkoVldEaH/yG+x17
 5myA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to;
 bh=1nCC1pVCpo6a1FBtaf21dUN0TQ+qxWr9csbUN83atYg=;
 b=HIwYngCASQcd6oEK2fQnMkwEG9DOxCIVleDBHRynHNUTv/Fnxs5AzvtFGv2pocLpAJ
 Glk+0Q2ElmpWthI2hJd20ptIRmelDY98DjhEp+9Hi2gE7vk12LgBZiyOGOTXFYGsA9h2
 M8E60J/t1sQVJ9cQ/0lmMMT6SCndu7nyFxqPGGzRK1fI8S8ouRog27YLmdzclDG6zoUc
 OoXzYNQDH64gBvVCLEc39LGFLwZJhU+U1gVzFSULm+k80fcbb/KTU8Iyy33dY6nDIcU4
 ysvjd9cyf9iMUigxhcvkuWmlqq1kMGdGkpYQ85U9ngck8piLbi0/A/egazIMrTh3RwFw
 qPxA==
X-Gm-Message-State: AGi0PubFyT0uynQTqU0gqXSqBRJ7MoRq5cgwr6+2LlS0j78P9LQ2Ggz6
 vmBeaMad67c4Ourc9XSLmm7fHoZuK7B7AZCVyH6TMJvr
X-Google-Smtp-Source: APiQypJfmrTpPPwmC5h8A6Da/Lt58VFmEHtEnSx1okwQKPFC+EhWwK7MqRCC4gHhrwUlV6uwDqpuLFMRIyhT/vJqqY8=
X-Received: by 2002:a05:6830:1059:: with SMTP id
 b25mr10710746otp.292.1588185378394; 
 Wed, 29 Apr 2020 11:36:18 -0700 (PDT)
MIME-Version: 1.0
References: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
In-Reply-To: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Wed, 29 Apr 2020 18:35:42 +0000
Message-ID: <CAOqdjBeCgHwS_+C9aXXUeonY3V=ejKjM=1gGSZAM2v_5nMDyxQ@HIDDEN>
Subject: Re: bug#40968: 28.0.50; (apply nil)
To: 40968 <at> debbugs.gnu.org
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40968
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Wed, Apr 29, 2020 at 6:27 PM Pip Cet <pipcet@HIDDEN> wrote:
> Should we fix the special case or raise apply's minimum argument count to 2?

The byte compiler also gets single-argument `apply' "wrong", so the
latter would seem to be the best option, to me.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 29 Apr 2020 18:26:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 29 14:26:57 2020
Received: from localhost ([127.0.0.1]:44528 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jTrQ8-0001BF-TH
	for submit <at> debbugs.gnu.org; Wed, 29 Apr 2020 14:26:57 -0400
Received: from lists.gnu.org ([209.51.188.17]:50440)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jTrQ7-0001B8-KF
 for submit <at> debbugs.gnu.org; Wed, 29 Apr 2020 14:26:56 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:36116)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <pipcet@HIDDEN>) id 1jTrQ6-00048P-Su
 for bug-gnu-emacs@HIDDEN; Wed, 29 Apr 2020 14:26:55 -0400
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,
 RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=unavailable autolearn_force=no
 version=3.4.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1)
 (envelope-from <pipcet@HIDDEN>) id 1jTrQ5-0007xg-Fy
 for bug-gnu-emacs@HIDDEN; Wed, 29 Apr 2020 14:26:54 -0400
Received: from mail-oi1-x22d.google.com ([2607:f8b0:4864:20::22d]:44034)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <pipcet@HIDDEN>) id 1jTrQ5-0007xQ-46
 for bug-gnu-emacs@HIDDEN; Wed, 29 Apr 2020 14:26:53 -0400
Received: by mail-oi1-x22d.google.com with SMTP id a2so2688758oia.11
 for <bug-gnu-emacs@HIDDEN>; Wed, 29 Apr 2020 11:26:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=qtwHIwINeqGe35YK93kobOwYX5CzMXlK6azGqWxnfxw=;
 b=gcPE/yi+SKrKoQtXmEfKD+RwKNfk7TUCipGQ33CyzYRnFGHA0PT4zYz6wue4Aq7Q7Y
 5VMhy0OwoTQ7YS/mTdoYxleKl9PR4+YI+yiNGI74VmZn42bVUCLN2wswXALb5C0LzI0m
 yOVcm0hsADY8dPZ/QEguyiCeY/i32M03jc1sBBn5LjTTEjOpF5UCUxqFsPSk7SPZ0fCV
 0ryG322kkk8a/DHDrsLpZMGEoVSqCU5TUdjwI2BLkLW0ZkUOgh0SntUMBoryFjUNcAiM
 vRomc9jdKsamFDzz9hduAvDYRItj8HTfuWW7OBNykpkoULdILt8H19R7PO1rv4oM7208
 ZINg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=qtwHIwINeqGe35YK93kobOwYX5CzMXlK6azGqWxnfxw=;
 b=fsRcqnxe1O40QimsW60uy79VgSIixHPyg4uBro7/FXiZP6Pn3CDfEhF+uH3iisFZGQ
 lMTAeiCD8H/SoG0QcdLvplqdySdS0CNIujpcgVHEIUH8Gay8GeQk5vVRWv7SUL1ilKa3
 8Ll8kr51np2q/sdrDRntddxP2s4WP6Qc1f5RSCjaS/si7LsC3YYyXUZ2UmnG1q/QSFdV
 4DhhGoaVI7nkrHVVhmqA7fTF/cmKzQghI28PchEaYOQf2DXi6F7aWqbXlAQLlLsx/+XI
 8+1Hm2PQcQ7YJNCVoWbDkSFiPDSGHEQB4IFEnmDtUT123xR4wGv78dIvZvNyHEgxiQ5g
 dmAg==
X-Gm-Message-State: AGi0PuZuDOzmB8ZbVt5IwJvuJXx9rYcLf0kbzY1ndhG2mLmljRbtYC0s
 vM1NdjMt4n6m1L4rmc+EhozAkT5Tpm3xZHEjbPNNXX69
X-Google-Smtp-Source: APiQypLn2PJiXq26WMvpis3uvbXaQhkM0BAGUiUg41qOwnytCs4KP/zLAOE2UQ8TxsEiL4mjtcy3ksNY5n3f6BtImww=
X-Received: by 2002:aca:ec87:: with SMTP id k129mr2772711oih.44.1588184811205; 
 Wed, 29 Apr 2020 11:26:51 -0700 (PDT)
MIME-Version: 1.0
From: Pip Cet <pipcet@HIDDEN>
Date: Wed, 29 Apr 2020 18:26:15 +0000
Message-ID: <CAOqdjBcEduhqB_2D959gAe5tPNQuHYaAMv+j1s0E78VQhY58eA@HIDDEN>
Subject: 28.0.50; (apply nil)
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=2607:f8b0:4864:20::22d;
 envelope-from=pipcet@HIDDEN; helo=mail-oi1-x22d.google.com
X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT :
 Malformed IPv6 address (bad octet value).
 Location : parse_addr6(), p0f-client.c:67
X-Received-From: 2607:f8b0:4864:20::22d
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

I'm very confused by the behavior of `apply' when given only a single
argument: when it's a nonempty list, the argument gets spread out and
passed to Ffuncall (I guess this might be useful sometimes). When it's
nil, Ffuncall gets called with nargs == 0 and Emacs crashes, at least
sometimes.

Should we fix the special case or raise apply's minimum argument count to 2?




Acknowledgement sent to Pip Cet <pipcet@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#40968; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 6 May 2020 21:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.