[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: texinfmt.el + kinsoku.el combined bug]
From: |
Kenichi Handa |
Subject: |
Re: address@hidden: texinfmt.el + kinsoku.el combined bug] |
Date: |
Tue, 26 Aug 2003 10:27:23 +0900 (JST) |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) |
In article <address@hidden>, Thierry Emery <address@hidden> writes:
> Okay, i have installed CVS Emacs 21.3.50 and reproduced the bug with the
> attached file (it contains the skk.texi paragraph which produced the bug with
> Emacs 20.3 and a modified value for fill-column in its "local variables"
> comment).
Thank you. With that file, I can preduced the bug with CVS
HEAD.
> I have also checked that the tentative patch is still
> applicable for kinsoku.el and texinfmt.el in Emacs 21.3.50
> and that it still solves the bug.
I confirmed it. But, I think it is not the right thing to
change texinfmt.el and kinsoke.el that way. The basic
problem is that fill-paragraph/region is called on a text
that still contains texinfo commands such as @samp{...}.
You wrote:
> The "@footnote" command at point 26950 of this file is handled by
> `texinfo-format-footnote', which calls `texinfo-format-end-node', which
> calls `fill-paragraph', which calls `fill-region-as-paragraph', which itself
> calls `kinsoku', which inserts a newline between the next @samp and its
> opening brace.
I don't know why textinfo-format-end-node has to call
fill-paragraph. As far as the current paragraph contains
textinfo commands, after processing them, the paragraph must
be filled again. Actually, for the example paragraph of
skk, @refill is automatically appended. So, there's no need
of calling fill-paragraph in textinfo-format-end-node.
How about the attached change? Robert, what do you think
about it?
---
Ken'ichi HANDA
address@hidden
*** texinfmt.el.~1.69.~ Fri Jun 13 08:21:04 2003
--- texinfmt.el Tue Aug 26 10:22:12 2003
***************
*** 1554,1560 ****
(delete-region (save-excursion (skip-chars-backward " \t\n") (point))
(point))
(insert (format " (%d) " texinfo-footnote-number))
! (fill-paragraph nil)
(save-excursion
(if (search-forward "\n--------- Footnotes ---------\n" nil t)
(progn ; already have footnote, put new one before end of node
--- 1554,1562 ----
(delete-region (save-excursion (skip-chars-backward " \t\n") (point))
(point))
(insert (format " (%d) " texinfo-footnote-number))
! ;; We don't have to fill the paragraph now because @refill should
! ;; have been appended already.
! ;; (fill-paragraph nil)
(save-excursion
(if (search-forward "\n--------- Footnotes ---------\n" nil t)
(progn ; already have footnote, put new one before end of node