[Top][All Lists]

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

[bug #54909] [mm] incorrect paragraph indentation after displays and lis

From: G. Branden Robinson
Subject: [bug #54909] [mm] incorrect paragraph indentation after displays and lists when \n[Pt]=2
Date: Sun, 29 Jan 2023 19:37:09 -0500 (EST)

Update of bug #54909 (project groff):

                  Status:             In Progress => Fixed                  
             Open/Closed:                    Open => Closed                 


Follow-up Comment #3:

commit 814e204d1675ef9c6da4fb4e2736d5937256f106
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Tue Jan 24 14:47:24 2023 -0600

    [mm]: Fix Savannah #54909.
    When register `Pt` was 2, paragraphs immediately following displays and
    lists were being indented, contrary to DWB mm behavior.
    * m.tmac: Replace `par@ind-flag` register with two separate state bits,
      `par*indentation-eligible` and `par@suppress-indentation`.
      (P, nP): Remove complex test for deciding whether the current
      paragraph is being set immediately after a heading.
      (P): Set `par*indentation-eligible` to the logical complement of
      `par@suppress-indentation`.  Call `par@doit` (which underlies both `P`
      and `nP`) unconditionally.
      (nP): Force `par*indentation-eligible` off, since numbered paragraphs
      are not influenced by a `Pt` value of "2" in DWB mm.  {The paragraph
      number occupies the indentation space.} (par@doit): Introduce local
      register `par*do-indent`, manipulate it, and use it to control `ti`
      request instead of scattering the request across multiple locations.
      Remove this register when done.  Clear `par@suppress-indentation` at
      end, since after indentation is suppressed once, it should not happen
      again until a special circumstance (the setting of a heading, display,
      or list) arises.
      (H): Convert test of `hd*htype` register, which tells us if we're
      setting a run-in heading or not, from `if` to `ie`.  (The first
      paragraphing macro call after a run-in heading should _not_ have its
      indentation suppressed, because the material after the heading title
      constitutes a first pagraph.)  In the true arm, set
      `par@suppress-indentation`; in the new else arm, clear it.  This
      replaces the "complex test" above, and seems much more straightforward
      and reliable.  Stop manipulating `par@ind-flag`.
      (df@end, ds@end, LC): Set `par@suppress-indentation` instead of
      clearing `par@ind-flag`.
      (LE): Set `par@suppress-indentation`.

    Fixes Savannah #54909.  Thanks to Jeff Conrad for the report.

commit 827c767f047c222d03fd5216cf39fa3e24d4a5de
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Tue Jan 24 14:10:25 2023 -0600

    [mm]: Regression-test Savannah #54909.
    * contrib/mm/tests/P-indentation-works.sh: Do it.
    * contrib/mm/mm.am (mm_TESTS): Run test.


Reply to this item at:


Message sent via Savannah

reply via email to

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