diff options
author | Eli Zaretskii <eliz@gnu.org> | 2023-05-13 11:28:38 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2023-05-13 11:28:38 +0300 |
commit | 7acae22f42f1b2df2042d5d77a0839f0ca9c02e7 (patch) | |
tree | bfe015b007daff3d3f5b2ff4474067da9eb882b4 /test/lisp/emacs-lisp/multisession-tests.el | |
parent | 4bda96273490e025d1fd1a50b4bf3cab1b2def1c (diff) | |
download | emacs-7acae22f42f1b2df2042d5d77a0839f0ca9c02e7.tar.gz emacs-7acae22f42f1b2df2042d5d77a0839f0ca9c02e7.tar.bz2 emacs-7acae22f42f1b2df2042d5d77a0839f0ca9c02e7.zip |
Fix auto-filling in Texinfo mode
This fixes auto-filling in Texinfo buffers. It was broken by the
fix to bug#49558, which made M-q fill over-long @noindent lines by
refraining from customizing 'paragraph-separate' in Texinfo mode.
The underlying problem here is that 'auto-fill-mode' doesn't call
mode-specific filling functions, but does its job by itself, and
depends on 'forward-paragraph' to find the beginning of the
paragraph as appropriate for calculation of 'fill-prefix', and a
different value of 'paragraph-separate' broke that. As a side
effect, the change below also changes paragraph-movement commands
in Texinfo back to how they behaved prior to that bugfix, but I
don't see why the paragraph-movement behavior introduced by that
fix made more sense. Try to move through a series of
@-directives, like a paragraph preceded by several @cindex
entries, and you will see the inconsistencies. In any case, the
adverse effects of that fix on auto-filling is unacceptable.
* lisp/textmodes/texinfo.el (fill-paragraph-separate): New
variable.
(texinfo-mode): Set 'fill-paragraph-separate' to the default value
of 'paragraph-separate'. Customize 'paragraph-separate' to the
Texinfo-specific value, as it was before commit dde591571abf.
(texinfo--fill-paragraph): Bind 'paragraph-separate' to the value
of 'fill-paragraph-separate', to keep 'M-q' happy.
Diffstat (limited to 'test/lisp/emacs-lisp/multisession-tests.el')
0 files changed, 0 insertions, 0 deletions