From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#58602: 29.0.50; Please document (:documentation FORM) spec for closures Date: Tue, 18 Oct 2022 09:34:29 -0400 Message-ID: References: <87r0z69cxj.fsf@web.de> <87h701izxa.fsf@web.de> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28398"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 58602@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 18 15:59:03 2022 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 1okn7X-0007AJ-8M for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Oct 2022 15:59:03 +0200 Original-Received: from localhost ([::1]:37698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okn7S-0006Tf-2I for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Oct 2022 09:58:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okmkI-0006QC-EU for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2022 09:35:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52555) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okmkI-0005fo-0j for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2022 09:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okmkH-0004Qv-RK for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2022 09:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Oct 2022 13:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58602 X-GNU-PR-Package: emacs Original-Received: via spool by 58602-submit@debbugs.gnu.org id=B58602.166610008417008 (code B ref 58602); Tue, 18 Oct 2022 13:35:01 +0000 Original-Received: (at 58602) by debbugs.gnu.org; 18 Oct 2022 13:34:44 +0000 Original-Received: from localhost ([127.0.0.1]:51631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okmk0-0004QG-GB for submit@debbugs.gnu.org; Tue, 18 Oct 2022 09:34:44 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:34380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okmjv-0004Pq-Mf for 58602@debbugs.gnu.org; Tue, 18 Oct 2022 09:34:43 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 549D344286B; Tue, 18 Oct 2022 09:34:34 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id ED8E7442868; Tue, 18 Oct 2022 09:34:32 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666100073; bh=RbJ2pQuhl8Uj32TRucAaz8XZ0AsPjLQd0zZm9LTnyok=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=bHy+B+NlmY+GEy8sXs6WEQBJg6giRVX3Hmh4+T9iUJghr266b43GMnyXKeduzE4y6 lCkzjGkRHqYoAxG3ZbrYEvIiH5Ui1plmHjpVt79OshJ+Tjt0QsvjlKmYapjt2KxwlI Ct0ypr59jqW3F2hZcX9L0PJtmFrTyoPwfnTTXOArHrxLvnljVL7ON39yduvPQDC5va ++LOvw8hBCwOdYUVdqDXuo+m8w1jGJjy9fWDopmK4lgqO2wRNhpVqOURMbZif+GHMR 7Dfl9skCn7nHRhNXBM44IcN/kv/w4E+obf1oc9v7zsFYsBGW4eyLG0xtWenR7uMlCj 81qJ6d+/yc5Qw== Original-Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id CBA7E120E8E; Tue, 18 Oct 2022 09:34:32 -0400 (EDT) In-Reply-To: <87h701izxa.fsf@web.de> (Michael Heerdegen's message of "Tue, 18 Oct 2022 05:16:49 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:245796 Archived-At: Michael Heerdegen [2022-10-18 05:16:49] wrote: > Stefan Monnier writes: >> +Documentation strings are usually completely static, but occasionally >> +it can be necessary to generate them dynamically. In some cases this >> +can be done by writing a macro which will generate at compile time the >> +code of the function, including the desired documentation string. >> +But you can also generate the docstring at run-time > I wonder: run-time or eval-time? In my world these are two words to say the same thing. >> + when the function >> +is defined by writing @code{(:documentation @var{form})} instead of >> +the documentation string@footnote{This only works in code using >> +@code{lexical-binding}.}. Furthermore, you can also compute the >> +documentation string on the fly when it is requested by setting >> +the @code{function-documentation} property of the function's symbol to >> +a Lisp form that should evaluate to a string. > > When is that form evaluated? When the documentation string "is requested". Stefan