emacs/test/lisp/emacs-lisp/bytecomp-resources
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
..
bc-test-alpha.el
bc-test-beta.el
error-lexical-var-with-add-hook.el
error-lexical-var-with-remove-hook.el
error-lexical-var-with-run-hook-with-args-until-failure.el
error-lexical-var-with-run-hook-with-args-until-success.el
error-lexical-var-with-run-hook-with-args.el
error-lexical-var-with-symbol-value.el
foo-inlinable.el
fun-attr-warn.el Warn about misplaced or duplicated function/macro declarations 2022-06-17 17:25:29 +02:00
no-byte-compile.el Move lexical-binding warning from checkdoc to byte-compiler 2023-10-21 15:12:55 +02:00
nowarn-inline-after-defvar.el
warn-autoload-not-on-top-level.el
warn-callargs-defsubst.el
warn-callargs.el
warn-defcustom-nogroup.el
warn-defcustom-notype.el
warn-defvar-lacks-prefix.el
warn-format.el
warn-free-setq.el
warn-free-variable-reference.el
warn-interactive-only.el
warn-lambda-malformed-interactive-spec.el
warn-make-process-missing-keyword-arg.el Check keyword args of make-process 2023-08-08 18:23:00 +02:00
warn-make-process-missing-keyword-value.el Check keyword args of make-process 2023-08-08 18:23:00 +02:00
warn-make-process-repeated-keyword-arg.el Check keyword args of make-process 2023-08-08 18:23:00 +02:00
warn-make-process-unknown-keyword-arg.el Check keyword args of make-process 2023-08-08 18:23:00 +02:00
warn-make-variable-buffer-local.el
warn-obsolete-defun.el
warn-obsolete-hook.el
warn-obsolete-variable-bound.el
warn-obsolete-variable-same-file.el
warn-obsolete-variable.el
warn-redefine-defun-as-macro.el
warn-redefine-defun.el
warn-redefine-macro-as-defun.el
warn-save-excursion.el
warn-variable-let-bind-constant.el
warn-variable-let-bind-nonvariable.el
warn-variable-set-constant.el
warn-variable-setq-nonvariable.el Normalise setq during macro-expansion 2022-06-14 20:19:59 +02:00
warn-variable-setq-odd.el Normalise setq during macro-expansion 2022-06-14 20:19:59 +02:00
warn-wide-docstring-autoload.el
warn-wide-docstring-custom-declare-variable.el
warn-wide-docstring-defalias.el
warn-wide-docstring-defconst.el
warn-wide-docstring-define-abbrev-table.el
warn-wide-docstring-define-obsolete-function-alias.el
warn-wide-docstring-define-obsolete-variable-alias.el
warn-wide-docstring-defun.el Single string literal in body is return value only, not doc string 2024-03-07 13:47:53 +01:00
warn-wide-docstring-defvar.el
warn-wide-docstring-defvaralias.el
warn-wide-docstring-ignore-fill-column.el
warn-wide-docstring-ignore-function-signature.el Accept more wide function signatures in docstrings 2022-09-16 22:28:46 +02:00
warn-wide-docstring-ignore-override.el
warn-wide-docstring-ignore-substitutions.el
warn-wide-docstring-ignore.el
warn-wide-docstring-multiline-first.el
warn-wide-docstring-multiline.el