GNU bug report logs - #49558
fill paragraph in texinfo-mode fails with @

Previous Next

Package: emacs;

Reported by: lisa-asket <at> perso.be

Date: Wed, 14 Jul 2021 03:58:01 UTC

Severity: normal

Tags: patch

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 49558 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: lisa-asket <at> perso.be
Cc: 49558 <at> debbugs.gnu.org
Subject: Re: bug#49558: fill paragraph in texinfo-mode fails with @
Date: Wed, 14 Jul 2021 09:47:11 +0200
lisa-asket <at> perso.be writes:

> I am using `M-q` to fill my paragraphs.  I have noticed that in texinfo-mode,
> doing `M-q` on a paragraph starting with `@` does not refill the paragraph.
>
> This occurs in instances such as
>
> @noindent Everyone is permitted to copy and distribute verbatim
> copies of this license document, but changing it is not allowed.

This is because texinfo-mode regards almost any line that starts with a
@ as a paragraph separator, so forward-paragraph etc doesn't work
properly on those lines.

The following patch fixes the problem, but I'm not sure this is the
correct thing, but the manual says:

--
Lines that start a new paragraph and are
contained in it must match only ‘paragraph-start’, not
‘paragraph-separate’. 
--

So I think it is?  But this code has been basically like this for
decades...  anybody got any comments about why it is like it is today?

diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el
index 11d60e1eb0..311b2055ed 100644
--- a/lisp/textmodes/texinfo.el
+++ b/lisp/textmodes/texinfo.el
@@ -411,9 +411,6 @@ texinfo-mode
 		      "\\)\\>"))
   (setq-local require-final-newline mode-require-final-newline)
   (setq-local indent-tabs-mode nil)
-  (setq-local paragraph-separate
-	      (concat "@[a-zA-Z]*[ \n]\\|"
-		      paragraph-separate))
   (setq-local paragraph-start (concat "@[a-zA-Z]*[ \n]\\|"
 				      paragraph-start))
   (setq-local sentence-end-base "\\(@\\(end\\)?dots{}\\|[.?!]\\)[]\"'”)}]*")


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 254 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.