GNU bug report logs - #59014
29.0.50; single string in function body should act as doc string

Previous Next

Package: emacs;

Reported by: Nicolas Graner <nicolas <at> graner.name>

Date: Fri, 4 Nov 2022 12:27:01 UTC

Severity: normal

Found in version 29.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#59014: closed (29.0.50; single string in function body should
 act as doc string)
Date: Fri, 04 Nov 2022 17:45:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 04 Nov 2022 13:44:18 -0400
with message-id <jwv8rkqvcm6.fsf-monnier+emacs <at> gnu.org>
and subject line Re: bug#59014: 29.0.50; single string in function body should act as doc string
has caused the debbugs.gnu.org bug report #59014,
regarding 29.0.50; single string in function body should act as doc string
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
59014: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59014
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Nicolas Graner <nicolas <at> graner.name>
To: bug-gnu-emacs <at> gnu.org 
Subject: 29.0.50; single string in function body should act as doc string
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.

This last sentence is no longer true in 29.0.50, the single string is
not used as doc string:

(defun f () "foo")
⇒ f
(f)
⇒ "foo"
(documentation 'f)
⇒ nil
(emacs-version)
⇒ "GNU Emacs 29.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0)
 of 2022-11-03"

Hope this helps,
Nicolas


[Message part 3 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: 59014-done <at> debbugs.gnu.org
Subject: Re: bug#59014: 29.0.50; single string in function body should act
 as doc string
Date: Fri, 04 Nov 2022 13:44:18 -0400
>> Should be fixed now,
> Thanks, works now.

Closing,


        Stefan



This bug report was last modified 2 years and 277 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.