Update the `fill-region-as-paragraph-semlf' function to follow the
`fill-region-as-paragraph-function' protocol. This allows us to
reimplement the `fill-paragraph-semlf' function using `fill-paragraph'
and `fill-region-as-paragraph-function'.
* lisp/textmodes/fill.el (fill-region-as-paragraph-semlf): Make this
function compatible with `fill-region-as-paragraph-function'. Avoid
narrowing.
(fill-paragraph-semlf): Reimplement using `fill-paragraph' and
`fill-region-as-paragraph-function'.
* test/lisp/textmodes/fill-tests.el (fill-test-semlf-fill-region): Add
test.
(fill-test-fill-paragraph-semlf-fill-paragraph-function): Remove test.
(fill-test-fill-paragraph-semlf, fill-test-semlf)
(fill-test-fill-paragraph-semlf-justify, fill-test-semlf-justify)
(fill-test-fill-paragraph-semlf-sentence-end-double-space)
(fill-test-semlf-sentence-end-double-space)
(fill-test-fill-paragraph-semlf-fill-column, fill-test-semlf-fill-column)
(fill-test-fill-paragraph-semlf-punctuation-marks)
(fill-test-semlf-punctuation-marks, fill-test-fill-paragraph-semlf-twice)
(fill-test-semlf-twice, fill-test-fill-paragraph-semlf-fill-prefix)
(fill-test-semlf-fill-prefix)
(fill-test-fill-paragraph-semlf-indented-block)
(fill-test-semlf-indented-block, fill-test-fill-paragraph-semlf-revert)
(fill-test-semlf-revert, fill-test-fill-paragraph-semlf-emacs-lisp-mode)
(fill-test-semlf-emacs-lisp-mode, fill-test-fill-paragraph-semlf-c-mode)
(fill-test-semlf-c-mode, fill-test-fill-paragraph-semlf-org-mode)
(fill-test-semlf-org-mode, fill-test-fill-paragraph-semlf-markdown-mode)
(fill-test-semlf-markdown-mode): User shorter function names consistent
with erts file names.
* test/lisp/textmodes/fill-resources/semlf-fill-region.erts: Add test
data.
* test/lisp/textmodes/fill-resources/semlf-fill-paragraph-function.erts:
Delete file.
* test/lisp/textmodes/fill-resources/semlf-emacs-lisp-mode.erts: Remove
newlines around indented block.
* doc/lispref/text.texi (Filling): Highlight that
`fill-region-as-paragraph-function' changes the behavior of
`fill-paragraph'.
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Copyright (C) 2001-2025 Free Software Foundation, Inc. -*- outline -*-
See the end of the file for license conditions.
README for the Emacs Lisp Reference Manual.
* This directory contains the texinfo source files for the Emacs Lisp
Reference Manual.
* Report bugs in the Lisp Manual (or in Emacs) using M-x report-emacs-bug.
To ask questions, use the help-gnu-emacs mailing list.
* The Emacs Lisp Reference Manual is quite large. It totals around
1100 pages in smallbook format; the info files total around 3.0 megabytes.
* You can format this manual for Info, for printing hardcopy using TeX,
or for HTML.
* You can buy nicely printed copies from the Free Software Foundation.
Buying a manual from the Free Software Foundation helps support our GNU
development work. See <https://shop.fsf.org/>.
(At time of writing, this manual is out of print.)
* The master file for formatting this manual for Tex is called 'elisp.texi'.
It contains @include commands to include all the chapters that make up
the manual.
* This distribution contains a Makefile that you can use with GNU Make.
** To make an Info file, you need to install Texinfo, then run 'make info'.
** Use 'make elisp.pdf' or 'make elisp.html' to create PDF or HTML versions.
This file is part of GNU Emacs.
GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.