summaryrefslogtreecommitdiff
path: root/test/lisp/subr-tests.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-10-02 21:56:22 +0200
committerStefan Kangas <stefan@marxist.se>2021-10-03 01:59:52 +0200
commit6c01a213656cc1d38c9ac0b127583910a9296365 (patch)
tree8ece474c39a767c8c50d86869c3adcf269ed9178 /test/lisp/subr-tests.el
parent55dadbc57e5e89bd6aa67d26c5dc1a32a0a279fc (diff)
downloademacs-6c01a213656cc1d38c9ac0b127583910a9296365.tar.gz
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 'test/lisp/subr-tests.el')
-rw-r--r--test/lisp/subr-tests.el15
1 files changed, 7 insertions, 8 deletions
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el
index ed9a3d01498..0da1ae96873 100644
--- a/test/lisp/subr-tests.el
+++ b/test/lisp/subr-tests.el
@@ -769,15 +769,14 @@ See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19350."
(ert-deftest subr-test-internal--format-docstring-line ()
(should
- (string= (let ((fill-column 60))
+ (string= (let ((fill-column 70))
(internal--format-docstring-line
- "Emacs is the advanced, extensible, customizable, \
-self-documenting editor. This manual describes how to edit with Emacs and \
-some of the ways to customize it; it corresponds to GNU Emacs version 28.1."))
- "Emacs is the advanced, extensible, customizable,
-self-documenting editor. This manual describes how to edit
-with Emacs and some of the ways to customize it; it
-corresponds to GNU Emacs version 28.1.")))
+ "In addition to any hooks its parent mode might have run, this \
+mode runs the hook ‘foo-bar-baz-very-long-name-indeed-mode-hook’, as the final \
+or penultimate step during initialization."))
+ "In addition to any hooks its parent mode might have run, this mode
+runs the hook ‘foo-bar-baz-very-long-name-indeed-mode-hook’, as the
+final or penultimate step during initialization.")))
(ert-deftest test-ensure-list ()
(should (equal (ensure-list nil) nil))