]> git.eshelyaron.com Git - emacs.git/commit
Add semantic linefeed support for paragraph filling
authorRoi Martin <jroi.martin@gmail.com>
Fri, 21 Mar 2025 13:22:46 +0000 (14:22 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 18 Jun 2025 08:13:12 +0000 (10:13 +0200)
commit49a251e0d8c5d15de5592e2503315d5256c41586
treef38b5bc5478b137ececc9249c6959c7ac33cccd9
parent6215240e3a9140a9e9692315f0dc8dd945e601cf
Add semantic linefeed support for paragraph filling

* lisp/textmodes/fill.el (fill-region-as-paragraph-semlf): Add function
to fill a region using semantic linefeeds as if it were a single
paragraph.
(fill-paragraph-semlf): Add function to fill paragraph using semantic
linefeeds.
* test/lisp/textmodes/fill-tests.el
(fill-test-fill-region-as-paragraph-semlf)
(fill-test-fill-paragraph-semlf)
(fill-test-fill-paragraph-semlf-fill-paragraph-function)
(fill-test-fill-paragraph-semlf-justify)
(fill-test-fill-paragraph-semlf-sentence-end-double-space)
(fill-test-fill-paragraph-semlf-fill-column)
(fill-test-fill-paragraph-semlf-punctuation-marks)
(fill-test-fill-paragraph-semlf-twice)
(fill-test-fill-paragraph-semlf-fill-prefix)
(fill-test-fill-paragraph-semlf-indented-block)
(fill-test-fill-paragraph-semlf-revert)
(fill-test-fill-paragraph-semlf-emacs-lisp-mode)
(fill-test-fill-paragraph-semlf-c-mode)
(fill-test-fill-paragraph-semlf-org-mode)
(fill-test-fill-paragraph-semlf-markdown-mode): Add tests.
* test/lisp/textmodes/fill-resources/semlf-c-mode.erts:
* test/lisp/textmodes/fill-resources/semlf-emacs-lisp-mode.erts:
* test/lisp/textmodes/fill-resources/semlf-fill-column.erts:
* test/lisp/textmodes/fill-resources/semlf-fill-paragraph-function.erts:
* test/lisp/textmodes/fill-resources/semlf-fill-prefix.erts:
* test/lisp/textmodes/fill-resources/semlf-fill-region-as-paragraph.erts:
* test/lisp/textmodes/fill-resources/semlf-indented-block.erts:
* test/lisp/textmodes/fill-resources/semlf-justify.erts:
* test/lisp/textmodes/fill-resources/semlf-markdown-mode.erts:
* test/lisp/textmodes/fill-resources/semlf-org-mode.erts:
* test/lisp/textmodes/fill-resources/semlf-punctuation-marks.erts:
* test/lisp/textmodes/fill-resources/semlf-revert.erts:
* test/lisp/textmodes/fill-resources/semlf-sentence-end-double-space.erts:
* test/lisp/textmodes/fill-resources/semlf-twice.erts:
* test/lisp/textmodes/fill-resources/semlf.erts: Add test data.  (Bug#78561)

(cherry picked from commit 24a699243e29649f1c126f56afaf4252fac95312)
17 files changed:
lisp/textmodes/fill.el
test/lisp/textmodes/fill-resources/semlf-c-mode.erts [new file with mode: 0644]
test/lisp/textmodes/fill-resources/semlf-emacs-lisp-mode.erts [new file with mode: 0644]
test/lisp/textmodes/fill-resources/semlf-fill-column.erts [new file with mode: 0644]
test/lisp/textmodes/fill-resources/semlf-fill-paragraph-function.erts [new file with mode: 0644]
test/lisp/textmodes/fill-resources/semlf-fill-prefix.erts [new file with mode: 0644]
test/lisp/textmodes/fill-resources/semlf-fill-region-as-paragraph.erts [new file with mode: 0644]
test/lisp/textmodes/fill-resources/semlf-indented-block.erts [new file with mode: 0644]
test/lisp/textmodes/fill-resources/semlf-justify.erts [new file with mode: 0644]
test/lisp/textmodes/fill-resources/semlf-markdown-mode.erts [new file with mode: 0644]
test/lisp/textmodes/fill-resources/semlf-org-mode.erts [new file with mode: 0644]
test/lisp/textmodes/fill-resources/semlf-punctuation-marks.erts [new file with mode: 0644]
test/lisp/textmodes/fill-resources/semlf-revert.erts [new file with mode: 0644]
test/lisp/textmodes/fill-resources/semlf-sentence-end-double-space.erts [new file with mode: 0644]
test/lisp/textmodes/fill-resources/semlf-twice.erts [new file with mode: 0644]
test/lisp/textmodes/fill-resources/semlf.erts [new file with mode: 0644]
test/lisp/textmodes/fill-tests.el