From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#28557: 26.0.60; Bugs using (:documentation FORM) in closures Date: Sun, 03 May 2020 03:32:50 +0200 Message-ID: <875zdd3irh.fsf@stefankangas.se> References: <87o9q2od3w.fsf@runbox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="10283"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 28557@debbugs.gnu.org, Stefan Monnier To: Gemini Lasswell Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 03 03:34:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jV3WG-0002ak-7H for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 May 2020 03:34:12 +0200 Original-Received: from localhost ([::1]:51806 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jV3WF-0002nd-4o for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 May 2020 21:34:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jV3W6-0002nJ-Mw for bug-gnu-emacs@gnu.org; Sat, 02 May 2020 21:34:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jV3W6-0005Ab-5w for bug-gnu-emacs@gnu.org; Sat, 02 May 2020 21:34:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42819) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jV3W5-0005AW-Pa for bug-gnu-emacs@gnu.org; Sat, 02 May 2020 21:34:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jV3W5-0003GL-Mn for bug-gnu-emacs@gnu.org; Sat, 02 May 2020 21:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 May 2020 01:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28557 X-GNU-PR-Package: emacs Original-Received: via spool by 28557-submit@debbugs.gnu.org id=B28557.158846958312439 (code B ref 28557); Sun, 03 May 2020 01:34:01 +0000 Original-Received: (at 28557) by debbugs.gnu.org; 3 May 2020 01:33:03 +0000 Original-Received: from localhost ([127.0.0.1]:54365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jV3V8-0003EZ-Tl for submit@debbugs.gnu.org; Sat, 02 May 2020 21:33:03 -0400 Original-Received: from ted.gofardesign.uk ([67.225.143.91]:41730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jV3V7-0003E3-3Y for 28557@debbugs.gnu.org; Sat, 02 May 2020 21:33:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=r9EnowTZgVCVS5hypNdf6EDSzl8Sj2GvSc273nDnO+0=; b=IAWTODlcKNyh0fwER7yqd1eDh7 LZZ0+nw6XIoJEkOaPdRAF65c5rttoeJF02jHVmvNyVOflJ+Wc3kvuOQ76FQuzPVMMYBtUEQweLC3g QN2NGt73HtwErQk56JXijwDP916jJyr8b/DeEf/YJvQAw5tTMwRb4VU/T6FwM02CkKZwAGxzEp2+i lLAu15ChxWv9nprX9KiPzLXKog1BOg1ItAxcMO0sg1MGbr5E7RBnAnwoOwNeKPdLWSnCxHuO5n7CT r+cEWm+f66a1il1acuLgTIEFi1AINqralQgQcSL0wJPdQ0vFP1E35GmLWQJ8AvX1Y0uvtODrFepdM X7Bmkkfg==; Original-Received: from h-4-70-69.a785.priv.bahnhof.se ([155.4.70.69]:32854 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jV3Uz-001GOc-3H; Sat, 02 May 2020 21:32:53 -0400 In-Reply-To: <87o9q2od3w.fsf@runbox.com> (Gemini Lasswell's message of "Fri, 22 Sep 2017 10:30:11 -0700") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:179556 Archived-At: Gemini Lasswell writes: > Since Emacs 25, docstrings can be constructed using > (:documentation FORM) in closures, when lexical-binding is on. This > isn't documented except in NEWS. Bug #24773 is about Edebug specs > which have not been updated to recognize :documentation. I'd like to > fix it, so I started trying to figure out which macros accept > :documentation forms so I would know which Edebug specs to update, and > that effort turned into a collection of tests for the feature, see > attached: There is a long list of tests here, but it seems like none of this was ever committed to master. Should it be? > While doing this I found these bugs: > > 1. A lambda wrapped by cl-function with a :documentation form will > not get a docstring and the :documentation form will be left in the > body of the closure. > > 2. In code run interactively, a :documentation form in cl-defmacro or > defmacro will work correctly. However if you byte-compile that code, > the byte-compiler stops with the following error message: > Symbol=E2=80=99s function definition is void: internal-make-closure > > 3. A :documentation form in cl-defgeneric only works if its argument > is a string literal. In cl-defmethod, it works whether the argument is > a string literal or an expression. > > 4. A :documentation form works in cl-iter-defun and iter-defun, but > not in iter-lambda. > > Stefan, here's a list of macros in which it appears to me that > (:documentation FORM) is supposed to work. Is this correct? Am I > missing any? > > lambda > pcase-lambda > defun > defmacro > cl-defun > cl-defmacro > iter-defun > cl-iter-defun > iter-lambda > function > cl-function > cl-defgeneric > cl-defmethod > defsubst > cl-defsubst Does anyone know the answers to the above questions? Best regards, Stefan Kangas