]> git.eshelyaron.com Git - emacs.git/commit
Add variable `fill-region-as-paragraph-function'
authorRoi Martin <jroi.martin@gmail.com>
Tue, 17 Jun 2025 08:45:13 +0000 (10:45 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 23 Jul 2025 20:08:25 +0000 (22:08 +0200)
commitd5d0d48c4f2e606440957c74bdcf0337a7025a8b
tree44d34ccf94d75d24c30f460138bbb9cd1798447f
parentbeab7b56c0eb5e04a199412d03bd67f74c7e8b5b
Add variable `fill-region-as-paragraph-function'

Add the variable `fill-region-as-paragraph-function' to provide
a way to override how functions like `fill-region' fill text.
* doc/lispref/text.texi (Filling): Document
`fill-region-as-paragraph-function' variable.
* doc/emacs/text.texi (Fill Commands): Reference
`fill-region-as-paragraph-function' variable.
* lisp/textmodes/fill.el (fill-region-as-paragraph-function):
Add variable.
(fill-region-as-paragraph): Convert into
`fill-region-as-paragraph-function' wrapper.
(fill-region-as-paragraph-default): Rename old
`fill-region-as-paragraph' function.
(fill-region-as-paragraph-semlf): Update calls to
`fill-region-as-paragraph-default'.
(fill-region): Add reference to `fill-region-as-paragraph-function'
in doc string.
* test/lisp/textmodes/fill-tests.el (fill-test-fill-region): Add
test case for the `fill-region' function.
* test/lisp/textmodes/fill-resources/fill-region.erts: Add test
data.  (Bug#78816)

(cherry picked from commit 99ec286d7803fa59f770013a2135f23918510103)
doc/emacs/text.texi
doc/lispref/text.texi
lisp/textmodes/fill.el
test/lisp/textmodes/fill-resources/fill-region.erts [new file with mode: 0644]
test/lisp/textmodes/fill-tests.el