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#59014: 29.0.50; single string in function body should act as doc string Date: Fri, 04 Nov 2022 11:14:55 -0400 Message-ID: References: <86fseyewi9.fsf@graner.name> <838rkq6fqd.fsf@gnu.org> 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="34250"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 59014@debbugs.gnu.org, Nicolas Graner To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 04 16:16:20 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 1oqyQd-0008kL-HI for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Nov 2022 16:16:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqyQO-0005Es-Jj; Fri, 04 Nov 2022 11:16:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqyQN-0005DM-Df for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 11:16:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oqyQM-0000r4-KR for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 11:16:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oqyQL-0007ze-Vg for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 11:16: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: Fri, 04 Nov 2022 15:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59014 X-GNU-PR-Package: emacs Original-Received: via spool by 59014-submit@debbugs.gnu.org id=B59014.166757490930652 (code B ref 59014); Fri, 04 Nov 2022 15:16:01 +0000 Original-Received: (at 59014) by debbugs.gnu.org; 4 Nov 2022 15:15:09 +0000 Original-Received: from localhost ([127.0.0.1]:54564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqyPV-0007yH-4n for submit@debbugs.gnu.org; Fri, 04 Nov 2022 11:15:09 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:45834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqyPQ-0007xS-TL for 59014@debbugs.gnu.org; Fri, 04 Nov 2022 11:15:06 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 521FA100197; Fri, 4 Nov 2022 11:14:59 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id A15231000FB; Fri, 4 Nov 2022 11:14:57 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1667574897; bh=GBsEPj5y/aRTCQ5Wy2bwC5cq/vxLz+9HTQe40GqPFS0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=l9OFJmlHioe9Mnb7E2luEHZe8FK6UxTyuBm9ovMFQ7/ei7Tei9dyHQjcUclLiUYl2 aTdN2LDghdTa6PUJk9guNOHbgxIKPUzaBdyizCO9DuMAcyS3foBaDWOpnQwCIrNxCh vPxIG2rpZn1o1Ic0YwBIbmrqdCtsQVFzil3SDR9F1srnK7FtBECk/3GdpwOMpJf+aQ 8zIq+nRBmEvhWpUoRs1DTKTGditIqiaj4BGAkvpHB8dtEbzrfvwNlRZp5xEMb8AEd5 EnOCdu1KtFeZf3BxUaEaJI7+epDbCVNiHQKbV+op9ik7//4/TaBaKuVc+hihKnmWwq x23GTvYZQrTpg== Original-Received: from alfajor (unknown [45.44.229.252]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6C28412102D; Fri, 4 Nov 2022 11:14:57 -0400 (EDT) In-Reply-To: <838rkq6fqd.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 04 Nov 2022 14:55:54 +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: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:247087 Archived-At: >> From: Nicolas Graner >> Date: Fri, 04 Nov 2022 13:26:22 +0100 >> >> According to the Emacs lisp manual, node "Documentation Strings of Functions": >> >> You may wonder how the documentation string could be optional, since >> there are required components of the function that follow it (the >> body). Since evaluation of a string returns that string, without any >> side effects, it has no effect if it is not the last form in the >> body. Thus, in practice, there is no confusion between the first >> form of the body and the documentation string; if the only body form >> is a string then it serves both as the return value and as the >> documentation. Boy, I should (re)read this manual more regularly. I was convinced the intended behavior was to treat (defun f () "foo") as a function with no docstring (as witnessed in the resulting behavior I implemented). > Stefan, this seems to be due to your changes in commit > 39e8fd357dd0a1f3776c05eee2cc5be451686712. Specifically, the new > function-documentation returns nil in this case. Could you please > take a look at this? Will do, Stefan