From: Ingo Schwarze <schwarze@usta.de>
To: tech@mdocml.bsd.lv
Subject: [PATCH] .Sm spacing
Date: Tue, 13 Jul 2010 23:46:50 +0200 [thread overview]
Message-ID: <20100713214650.GD31123@iris.usta.de> (raw)
Hi,
here is a very small patch to fix .Sm spacing.
When saying ".Sm on", you expect spacing to start right away, not after
the following token. Thus, we need to clear the TERMP_NOSPACE flag in
addition to clearing TERMP_NONOSPACE. On the other hand, we still do
not want spacing at the beginning of a line (in the sense of "line" as
defined in termp_flushln), so leave TERMP_NOSPACE intact when in
column 0.
In OpenBSD, this fixes the following pages for me:
- chmod(1):
The display right below "Symbolic modes",
- chmod <[who]op[perm]>,[[who]op[perm]],[...]file [...]
+ chmod <[who]op[perm]>,[[who]op[perm]],[...] file [...]
- ksh(1):
A couple of cases where text followed stuff like
${name[expr]}, ${name=value}, <var><op>=<expr>
without a space.
- tar(1):
The first SYNOPSIS:
- tar {crtux}[014578befHhjLmOoPpqsvwXZz][blocking-factor
- | archive | replstr] [-C directory] [-I file] [file ...]
+ tar {crtux}[014578befHhjLmOoPpqsvwXZz]
+ [blocking-factor | archive | replstr] [-C directory] [-I file]
+ [file ...]
- ps(1):
The SYNOPSIS:
- ps [-aCcehjkLlmrSTuvwx][-M core] [-N system] [-O fmt] [-o fmt] [-p pid]
+ ps [-aCcehjkLlmrSTuvwx] [-M core] [-N system] [-O fmt] [-o fmt] [-p pid]
[-t tty] [-U username] [-W swap]
And probably more...
OK?
Yours,
Ingo
Index: mdoc_term.c
===================================================================
RCS file: /cvs/src/usr.bin/mandoc/mdoc_term.c,v
retrieving revision 1.95
diff -u -p -r1.95 mdoc_term.c
--- mdoc_term.c 13 Jul 2010 01:09:13 -0000 1.95
+++ mdoc_term.c 13 Jul 2010 21:27:43 -0000
@@ -2062,9 +2062,11 @@ termp_sm_pre(DECL_ARGS)
{
assert(n->child && MDOC_TEXT == n->child->type);
- if (0 == strcmp("on", n->child->string))
+ if (0 == strcmp("on", n->child->string)) {
+ if (p->col)
+ p->flags &= ~TERMP_NOSPACE;
p->flags &= ~TERMP_NONOSPACE;
- else
+ } else
p->flags |= TERMP_NONOSPACE;
return(0);
--
To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv
next reply other threads:[~2010-07-13 21:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-13 21:46 Ingo Schwarze [this message]
2010-07-13 23:13 ` Kristaps Dzonsons
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=20100713214650.GD31123@iris.usta.de \
--to=schwarze@usta.de \
--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).