diff options
author | Stefan Kangas <stefan@marxist.se> | 2021-10-02 21:56:22 +0200 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2021-10-03 01:59:52 +0200 |
commit | 6c01a213656cc1d38c9ac0b127583910a9296365 (patch) | |
tree | 8ece474c39a767c8c50d86869c3adcf269ed9178 /lisp/emacs-lisp | |
parent | 55dadbc57e5e89bd6aa67d26c5dc1a32a0a279fc (diff) | |
download | emacs-6c01a213656cc1d38c9ac0b127583910a9296365.tar.gz emacs-6c01a213656cc1d38c9ac0b127583910a9296365.tar.bz2 emacs-6c01a213656cc1d38c9ac0b127583910a9296365.zip |
Clarify the purpose of internal--format-docstring-line
* test/lisp/subr-tests.el (subr-test-internal--format-docstring-line):
* lisp/subr.el (internal--format-docstring-line): Make it more clear
that this function is not intended for the first line of a docstring.
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Add comment explaining
why we use 'internal--format-docstring-line'.
Problem pointed out by Stefan Monnier <monnier@iro.umontreal.ca>.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 527720c6e8d..1852471bcbb 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -3087,6 +3087,14 @@ To see the documentation for a defined struct type, use ;; and pred-check, so changing it is not straightforward. (push `(,defsym ,accessor (cl-x) ,(concat + ;; NB. This will produce incorrect results + ;; in some cases, as our coding conventions + ;; says that the first line must be a full + ;; sentence. However, if we don't word wrap + ;; we will have byte-compiler warnings about + ;; overly long docstrings. So we can't have + ;; a perfect result here, and choose to avoid + ;; the byte-compiler warnings. (internal--format-docstring-line "Access slot \"%s\" of `%s' struct CL-X." slot name) (if doc (concat "\n" doc) "")) |