emacs/test/lisp/emacs-lisp
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
..
bytecomp-resources Single string literal in body is return value only, not doc string 2024-03-07 13:47:53 +01:00
edebug-resources ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
eieio-tests Use slot names rather than their :initargs 2024-02-07 11:11:38 -05:00
ert-font-lock-resources Add ert-font-lock 2023-12-03 15:17:58 +02:00
faceup-resources ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
faceup-tests ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
macroexp-resources Use defvar for variables that are not constant 2024-02-07 11:13:56 -05:00
package-resources ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
pp-resources Fix pp-emacs-lisp-code printing of cons cells 2022-05-17 19:45:20 +02:00
shadow-resources Use lexical-binding in most remaining emacs-lisp tests 2020-04-30 12:09:51 +02:00
testcover-resources ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
backquote-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
backtrace-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
benchmark-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
bindat-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
byte-run-tests.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
bytecomp-tests.el Repair miscompilation of single-arg apply (bug#69533) 2024-03-04 14:13:26 +01:00
cconv-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
check-declare-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
checkdoc-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cl-extra-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cl-generic-tests.el (cl--generic-describe): Fix regression introduced by fix to bug#54628 2024-02-11 18:13:27 -05:00
cl-lib-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cl-macs-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cl-preloaded-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cl-print-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cl-seq-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
comp-cstr-tests.el Revert "Update some native comp tests" 2024-03-04 11:19:08 -05:00
comp-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
copyright-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
derived-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
easy-mmode-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
edebug-tests.el (edebug-tests-trivial-comma): Avoid interaction (bug#69406) 2024-02-26 12:33:35 -05:00
ert-font-lock-tests.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
ert-tests.el Fix ert-tests.el for the new handler-bind code 2024-01-04 16:34:13 -05:00
ert-x-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
find-func-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
float-sup-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
generator-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
gv-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
hierarchy-tests.el ; hierarchy-tests.el: keep doc string within 80 columns 2024-01-31 17:55:53 +01:00
icons-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
let-alist-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
lisp-mnt-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
lisp-mode-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
lisp-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
macroexp-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
map-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
memory-report-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
multisession-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
nadvice-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
oclosure-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
package-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
pcase-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
pp-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
range-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
regexp-opt-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
ring-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
rmc-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
rx-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
seq-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
shadow-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
shortdoc-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
subr-x-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
syntax-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
tabulated-list-tests.el Add tabulated-list-groups and Buffer-menu-group-by (bug#69305) 2024-02-29 19:50:04 +02:00
testcover-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
text-property-search-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
thunk-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
timer-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
unsafep-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
vtable-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
warnings-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00