1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-12 14:30:42 -08:00
emacs/doc
Mattias Engdegård 61b2f5f96b Single string literal in body is return value only, not doc string
A function or macro body consisting of a single string literal now only
uses it as a return value.  Previously, it had the dual uses as return
value and doc string, which was never what the programmer wanted and
had some inconvenient consequences (bug#69387).

This change applies to `lambda`, `defun`, `defsubst` and `defmacro`
forms; most other defining forms already worked in the sensible way.

* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda):
Don't use a lone string literal as doc string.
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-defun.el
(foo): Update docstring warning test.
* doc/lispref/functions.texi (Function Documentation): Update.
* etc/NEWS: Announce.
2024-03-07 13:47:53 +01:00
..
emacs ; Fix markup in last change (bug#68929). 2024-02-17 18:57:12 +02:00
lispintro Fix info-xref-tests 2024-01-13 20:38:34 +02:00
lispref Single string literal in body is return value only, not doc string 2024-03-07 13:47:53 +01:00
man Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
misc When navigating through history in EWW, don't keep adding to 'eww-history' 2024-03-06 14:36:23 -08:00
translations ; Further copyedits of doc/translations/README. 2024-02-19 15:19:54 +02:00