From: Kristaps Dzonsons <kristaps@bsd.lv>
To: "tech@mdocml.bsd.lv" <tech@mdocml.bsd.lv>,
Jason McIntyre <jmc@kerhand.co.uk>
Subject: SYNOPSIS and auto-Bk
Date: Fri, 16 Jul 2010 14:51:24 +0200 [thread overview]
Message-ID: <4C4055CC.7020900@bsd.lv> (raw)
[-- Attachment #1: Type: text/plain, Size: 443 bytes --]
Hi,
The following patch enables SYNOPSIS sections (or blocks within the nS
register) to behave as if `Bk -words' were wrapping the entire section.
This makes for nice-looking SYNOPSIS sections where authors have omitted
the `Bk'; however, output would differ from groff, so I'm hesitant to
enable it. This has been tossed around for a while.
Thoughts? (Yes, the patch must be tweaked a bit before it's actually
checked in.)
Kristaps
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 815 bytes --]
Index: mdoc_term.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_term.c,v
retrieving revision 1.174
diff -r1.174 mdoc_term.c
334a335,337
> *
> * Also let SYNPRETTY sections behave as if they were wrapped in
> * a `Bk' block.
337c340
< if (TERMP_KEEP & p->flags) {
---
> if (TERMP_KEEP & p->flags || MDOC_SYNPRETTY & n->flags) {
346a350,361
> }
>
> /*
> * Since SYNPRETTY sections aren't "turned off" with `Ek', we
> * have to intuit whether we should disable formatting.
> */
>
> if ( ! (MDOC_SYNPRETTY & n->flags)) {
> if (n->prev && MDOC_SYNPRETTY & n->prev->flags)
> p->flags &= ~(TERMP_KEEP | TERMP_PREKEEP);
> if (n->parent && MDOC_SYNPRETTY & n->parent->flags)
> p->flags &= ~(TERMP_KEEP | TERMP_PREKEEP);
next reply other threads:[~2010-07-16 12:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-16 12:51 Kristaps Dzonsons [this message]
[not found] ` <20100716155142.GB32289@bramka.kerhand.co.uk>
2010-07-16 20:05 ` Kristaps Dzonsons
[not found] ` <20100716203520.GD32289@bramka.kerhand.co.uk>
2010-07-17 17:12 ` Kristaps Dzonsons
2010-07-17 18:35 ` Ingo Schwarze
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C4055CC.7020900@bsd.lv \
--to=kristaps@bsd.lv \
--cc=jmc@kerhand.co.uk \
--cc=tech@mdocml.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).