From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Arbitrary function: find the number(s) of expected arguments Date: Fri, 25 Mar 2016 11:44:03 +0300 Message-ID: <83pouj0wx8.fsf@gnu.org> References: <56E8906C.5050405@lanl.gov> <83y49e731p.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1458895490 9039 80.91.229.3 (25 Mar 2016 08:44:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Mar 2016 08:44:50 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Pogonyshev Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 25 09:44:44 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ajNMI-0008Ej-S3 for ged-emacs-devel@m.gmane.org; Fri, 25 Mar 2016 09:44:42 +0100 Original-Received: from localhost ([::1]:54716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajNMH-0000j2-QP for ged-emacs-devel@m.gmane.org; Fri, 25 Mar 2016 04:44:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49956) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajNLt-0000WT-4d for emacs-devel@gnu.org; Fri, 25 Mar 2016 04:44:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ajNLk-0003GY-1A for emacs-devel@gnu.org; Fri, 25 Mar 2016 04:44:16 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajNLj-0003GR-S9; Fri, 25 Mar 2016 04:44:07 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4585 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1ajNLj-0007UQ-5p; Fri, 25 Mar 2016 04:44:07 -0400 In-reply-to: (message from Paul Pogonyshev on Mon, 21 Mar 2016 19:36:45 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:202212 Archived-At: > Date: Mon, 21 Mar 2016 19:36:45 +0100 > From: Paul Pogonyshev > Cc: emacs-devel@gnu.org > > > We have sub-arity, so I think we should remove it and leave an alias > > that will call this new function for backward compatibility. Having > > both sounds redundant. > > Drew Adams wrote: > > > This sounds wrong to me. Just calling the new code (which I > > have not looked at, but which I presume does for arbitrary > > functions what `subr-arity' does for primitives) would NOT > > provide backward compatibility, precisely because it would > > (presumably) NOT have the same behavior as `subr-arity' for > > non-primitives - it would not raise an error. > > The patch itself doesn't touch `subr-arity'. Whether to alias > it to `func-arity' or not can be decided later. If we are going to keep sub-arity, I'd prefer if this new function called it, instead of copying its code inline. Also, I believe you said you'd write the documentation? Could you please add that? Then the patch will be ready to go in, I think. Thanks.