From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp1.rz.uni-karlsruhe.de (Debian-exim@smtp1.rz.uni-karlsruhe.de [129.13.185.217]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o6DLkrVR018735 for ; Tue, 13 Jul 2010 17:46:55 -0400 (EDT) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by smtp1.rz.uni-karlsruhe.de with esmtp (Exim 4.63 #1) id 1OYnJS-0001NY-Ta; Tue, 13 Jul 2010 23:46:51 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.71) (envelope-from ) id 1OYnJS-0004LU-SZ for tech@mdocml.bsd.lv; Tue, 13 Jul 2010 23:46:50 +0200 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.69) (envelope-from ) id 1OYnJS-0003bT-Rb for tech@mdocml.bsd.lv; Tue, 13 Jul 2010 23:46:50 +0200 Received: from schwarze by usta.de with local (Exim 4.71) (envelope-from ) id 1OYnJS-0008Vc-QP for tech@mdocml.bsd.lv; Tue, 13 Jul 2010 23:46:50 +0200 Date: Tue, 13 Jul 2010 23:46:50 +0200 From: Ingo Schwarze To: tech@mdocml.bsd.lv Subject: [PATCH] .Sm spacing Message-ID: <20100713214650.GD31123@iris.usta.de> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) 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}, = 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