[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `texinfo-format-buffer' doesn't fold long lines

From: Robert J. Chassell
Subject: Re: `texinfo-format-buffer' doesn't fold long lines
Date: Tue, 1 Mar 2005 10:30:47 -0500 (EST)

    > I see, and I will have to keep in mind that there might still be
    > need to fix the address@hidden address@hidden' problem.

    I'd rather not have us fix a problem by reintroducing another
    problem that we fixed in the past.  Isn't there another way to
    solve both of them at once?

Here is a fix to both at once; at least I hope so.

Basically, in emacs/lisp/textmodes/texinfmt.el, near the end of
texinfo-append-refill, I replaced the current search for



    @refill\\|^[ \t]*@

This defines the types of line to which @refill is *not* appended.
(address@hidden' should be on a line of its own; address@hidden' need not be.)
The change enables a writer to nest @itemize and similar entries like

    @itemize @bullet
    @item foo
      @itemize @minus
      @item bar
      @end itemize
    @end itemize

I also updated the texinfmt-version number and date.

Katsumi Yamaoka: does this change work with your files?

diff -rc2P /usr/local/src/emacs/lisp/textmodes/texinfmt.el.\~1.76.\~ 
*** /usr/local/src/emacs/lisp/textmodes/texinfmt.el.~1.76.~     Tue Mar  1 
12:26:36 2005
--- /usr/local/src/emacs/lisp/textmodes/texinfmt.el     Tue Mar  1 15:19:50 2005
*** 38,42 ****
        `(defvar ,var ,value ,doc)))
! (defvar texinfmt-version "2.40 of  6 Dec 2002")
  (defun texinfmt-version (&optional here)
--- 38,42 ----
        `(defvar ,var ,value ,doc)))
! (defvar texinfmt-version "2.41 of  1 Mar 2005")
  (defun texinfmt-version (&optional here)
*** 638,642 ****
            (unless (re-search-backward "@c[ \t\n]\\|@comment[ \t\n]" line-beg 
              (forward-char -1))
!           (unless (re-search-backward "@refill\\|@bye" line-beg t)
              (insert "@refill")))
            (forward-line 1))))))
--- 638,642 ----
            (unless (re-search-backward "@c[ \t\n]\\|@comment[ \t\n]" line-beg 
              (forward-char -1))
!           (unless (re-search-backward "@refill\\|^[ \t]*@" line-beg t)
              (insert "@refill")))
            (forward-line 1))))))

    Robert J. Chassell                         
    address@hidden                         GnuPG Key ID: 004B4AC8
    http://www.rattlesnake.com                  http://www.teak.cc

reply via email to

[Prev in Thread] Current Thread [Next in Thread]