From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#23486: 25.0.93; Modules: features missing from make_function Date: Tue, 04 Jul 2017 18:20:04 +0000 Message-ID: References: <871stj4bj3.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113d469457eab9055381efdd" X-Trace: blaine.gmane.org 1499192477 6741 195.159.176.226 (4 Jul 2017 18:21:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 4 Jul 2017 18:21:17 +0000 (UTC) Cc: 23486@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 04 20:21:11 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dSSRf-0001E6-ID for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Jul 2017 20:21:07 +0200 Original-Received: from localhost ([::1]:42528 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSSRk-00017d-M6 for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Jul 2017 14:21:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57395) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSSRe-00017X-Lc for bug-gnu-emacs@gnu.org; Tue, 04 Jul 2017 14:21:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSSRa-0008Bh-Lx for bug-gnu-emacs@gnu.org; Tue, 04 Jul 2017 14:21:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49746) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dSSRa-0008BY-Gm for bug-gnu-emacs@gnu.org; Tue, 04 Jul 2017 14:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dSSRa-0001N5-8T for bug-gnu-emacs@gnu.org; Tue, 04 Jul 2017 14:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Jul 2017 18:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23486 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23486-submit@debbugs.gnu.org id=B23486.14991924225200 (code B ref 23486); Tue, 04 Jul 2017 18:21:02 +0000 Original-Received: (at 23486) by debbugs.gnu.org; 4 Jul 2017 18:20:22 +0000 Original-Received: from localhost ([127.0.0.1]:52423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dSSQw-0001Ln-LM for submit@debbugs.gnu.org; Tue, 04 Jul 2017 14:20:22 -0400 Original-Received: from mail-oi0-f43.google.com ([209.85.218.43]:36164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dSSQu-0001LY-JT for 23486@debbugs.gnu.org; Tue, 04 Jul 2017 14:20:20 -0400 Original-Received: by mail-oi0-f43.google.com with SMTP id x187so51644817oig.3 for <23486@debbugs.gnu.org>; Tue, 04 Jul 2017 11:20:20 -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=A/fq8OceJLH8phFzbxJifXeC7sud4CAP+JR5aTM7tZI=; b=J8HbV4ou4faTlXmH0YHzFQKgG6lTYa16gEuADGBffasH/1tKma7awXExgRdtwcYoTu x8QoLZbAtp9boxLeLt97ejAT+a+VYIwt9WJqp5oyd2PFP+DKpuxx9yNKajE1DfOcIpGi fSIJ1OrtStGT+jFqkJRmtsYv7C6lsCu5fPcGD9b/GZ30EKekEBxMQp4sA1oTCWtWjJpW oYvPw1SIeQ0cVZ370YAP8djAdNxWNFcutdyGdDmAKx2UoOsNKDz8c/jdJv0Sf+nBBxk4 Ycp8nzNQY1yrMK8ynH45Q51CDSH15OqpqaCLclmwyd5jci7PUgHhfEH2sxNPBS2QyYig G6TQ== 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=A/fq8OceJLH8phFzbxJifXeC7sud4CAP+JR5aTM7tZI=; b=oYJswmbE6PIb3b7LmGnTPlSG57pVCzm/RN9CFkiggRWMcZrl8dAlctJ+LTmNQ/JhxZ jSYHNbntOy2uoGFfLQEg7jBtgpaZ59sykUJaUlsTipu1DvQ76ZOaXf1KOSInKoiPVrVR iwEFi8jgJBZ6w2qQk89oilWKTknLsj5ULpIyA8wJhzFbmB4ITgMTJzp4MoRqupdus7Se Z9tOaROek5XXTIyJrQzhVpwGpFMz7Zp+yCH+reXNP7s0p7Xajn35IlMnn7wWjSaKenEk empS4scpQyvfNJa4HIeiP6Qt8SP6FLmZP+S+y6ZPJV2A9mmALRRt4d46u6Xg8j6wg8b1 jkzA== X-Gm-Message-State: AIVw111sD/1i+qIn89WsiCFMOed+igeAbvnGzBAh4j+966lqtlMAgrLI D96rqVgsWOwcBfx89k/Caze/c9GjTA== X-Received: by 10.202.225.65 with SMTP id y62mr13696661oig.113.1499192414954; Tue, 04 Jul 2017 11:20:14 -0700 (PDT) In-Reply-To: <871stj4bj3.fsf@users.sourceforge.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:134180 Archived-At: --001a113d469457eab9055381efdd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable schrieb am Mo., 27. M=C3=A4rz 2017 um 05:5= 6 Uhr: > Philipp Stephani writes: > > > As an alternative, if people feel this would require too many > > parameters, I'd propose reverting the change that adds the documentatio= n > > string. A docstring without arglist is not very useful. We could also > > remove the arity parameters and have the C function check the arity > > itself. > > Looking at this a bit closer, I do think this adds too many parameters, > and in particular, requiring to pass in names for positional parameters > just makes no sense. The names are never used (except for displaying > documentation). > > But removing the docstring is not great. IMO, the right solution here > is to use a subr-like object instead of a lambda, as suggested in a > FIXME in emacs-module.c: > > /* FIXME: Use a bytecompiled object, or even better a subr. */ > > Then the arity could be checked with `subr-arity' or similar. > This is now done (commit 31fded0370c3aa6d2c4370cae21cdb7475873483). This fixes (1) through (3). (4) through (6) are still open. That's probably OK if the limitations are documented; modules can always do the equivalent of (eval '(defun ...)) to get complete support. --001a113d469457eab9055381efdd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


<npostavs@users.sourceforge.= net> schrieb am Mo., 27. M=C3=A4rz 2017 um 05:56=C2=A0Uhr:
=
Philipp Stephani <p.stephani2@gmail.com> writes:
> As an alternative, if people feel this would require too many
> parameters, I'd propose reverting the change that adds the documen= tation
> string.=C2=A0 A docstring without arglist is not very useful.=C2=A0 We= could also
> remove the arity parameters and have the C function check the arity > itself.

Looking at this a bit closer, I do think this adds too many parameters,
and in particular, requiring to pass in names for positional parameters
just makes no sense.=C2=A0 The names are never used (except for displaying<= br> documentation).

But removing the docstring is not great.=C2=A0 IMO, the right solution here=
is to use a subr-like object instead of a lambda, as suggested in a
FIXME in emacs-module.c:

=C2=A0 /* FIXME: Use a bytecompiled object, or even better a subr.=C2=A0 */=

Then the arity could be checked with `subr-arity' or similar.

This is now done (commit 31fded0370c3aa6d2c4370c= ae21cdb7475873483). This fixes (1) through (3). (4) through (6) are still o= pen. That's probably OK if the limitations are documented; modules can = always do the equivalent of (eval '(defun ...)) to get complete support= .=C2=A0
--001a113d469457eab9055381efdd--