diff options
author | Noam Postavsky <npostavs@gmail.com> | 2020-04-04 12:28:23 -0400 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2020-04-04 20:08:02 -0400 |
commit | f8607d3c03544afbe32c6bd324c287db305e569e (patch) | |
tree | 8456e415656c1d90f90e05a3e634479181cdc544 /test | |
parent | 7e78f0d1b26557b1af95c542cc95cff131c18ec8 (diff) | |
download | emacs-f8607d3c03544afbe32c6bd324c287db305e569e.tar.gz |
Handle filling of indented ChangeLog function entries
* lisp/vc/log-edit.el (log-edit-fill-entry): Relax regexp a bit to
recognize function entries with leading blanks.
* test/lisp/vc/log-edit-tests.el: New test.
Diffstat (limited to 'test')
-rw-r--r-- | test/lisp/vc/log-edit-tests.el | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/lisp/vc/log-edit-tests.el b/test/lisp/vc/log-edit-tests.el index bb3f6582325..86a40a97b19 100644 --- a/test/lisp/vc/log-edit-tests.el +++ b/test/lisp/vc/log-edit-tests.el @@ -74,6 +74,31 @@ couple of sentences. Long enough to be filled for several lines. \(fun9): Etc.")))) +(ert-deftest log-edit-fill-entry-indented-func-entries () + ;; Indenting function entries is a typical mistake caused by using a + ;; misconfigured or non-ChangeLog specific fill function. + (with-temp-buffer + (insert "\ +* dir/file.ext (fun1): + (fun2): + (fun3): +* file2.txt (fun4): + (fun5): + (fun6): + (fun7): Some prose. + (fun8): A longer description of a complicated change.\ + Spread over a couple of sentences.\ + Long enough to be filled for several lines. + (fun9): Etc.") + (goto-char (point-min)) + (let ((fill-column 72)) (log-edit-fill-entry)) + (should (equal (buffer-string) "\ +* dir/file.ext (fun1, fun2, fun3): +* file2.txt (fun4, fun5, fun6, fun7): Some prose. +\(fun8): A longer description of a complicated change. Spread over a +couple of sentences. Long enough to be filled for several lines. +\(fun9): Etc.")))) + (ert-deftest log-edit-fill-entry-trailing-prose () (with-temp-buffer (insert "\ |