aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc.7
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-08-08 16:38:06 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-08-08 16:38:06 +0000
commitf5961570a30be82a0ce533712baaf96472b8c92d (patch)
treefc26e21606ab38826c10b1cd9cd9c6245b237b37 /mdoc.7
parent70e747d7ece63a5e6430aba74fcb1149f98b79fd (diff)
downloadmandoc-f5961570a30be82a0ce533712baaf96472b8c92d.tar.gz
mandoc-f5961570a30be82a0ce533712baaf96472b8c92d.tar.zst
mandoc-f5961570a30be82a0ce533712baaf96472b8c92d.zip
When .Sm is called without an argument, groff toggles the spacing mode,
so let us do the same for compatibility. Using this feature is of course not recommended except in manual page obfuscation contests.
Diffstat (limited to 'mdoc.7')
-rw-r--r--mdoc.713
1 files changed, 9 insertions, 4 deletions
diff --git a/mdoc.7 b/mdoc.7
index ef2203dd..a8c60d5e 100644
--- a/mdoc.7
+++ b/mdoc.7
@@ -1,4 +1,4 @@
-.\" $Id: mdoc.7,v 1.233 2014/08/08 01:52:40 schwarze Exp $
+.\" $Id: mdoc.7,v 1.234 2014/08/08 16:38:06 schwarze Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010, 2011, 2013 Ingo Schwarze <schwarze@openbsd.org>
@@ -468,7 +468,7 @@ in the alphabetical
.It Sx \&Pf Ta prefix, no following horizontal space (one argument)
.It Sx \&Ns Ta roman font, no preceding horizontal space (no arguments)
.It Sx \&Ap Ta apostrophe without surrounding whitespace (no arguments)
-.It Sx \&Sm Ta switch horizontal spacing mode: Cm on | off
+.It Sx \&Sm Ta switch horizontal spacing mode: Op Cm on | off
.It Sx \&Bk , \&Ek Ta keep block: Fl words
.It Sx \&br Ta force output line break in text mode (no arguments)
.It Sx \&sp Ta force vertical space: Op Ar height
@@ -2335,7 +2335,7 @@ and
Switches the spacing mode for output generated from macros.
Its syntax is as follows:
.Pp
-.D1 Pf \. Sx \&Sm Cm on | off
+.D1 Pf \. Sx \&Sm Op Cm on | off
.Pp
By default, spacing is
.Cm on .
@@ -2344,6 +2344,11 @@ When switched
no white space is inserted between macro arguments and between the
output generated from adjacent macros, but text lines
still get normal spacing between words and sentences.
+.Pp
+When called without an argument, the
+.Sx \&Sm
+macro toggles the spacing mode.
+Using this is not recommended because it makes the code harder to read.
.Ss \&So
Multi-line version of
.Sx \&Sq .
@@ -3022,7 +3027,7 @@ then the macro accepts an arbitrary number of arguments.
.It Sx \&Pf Ta Yes Ta Yes Ta 1
.It Sx \&Pp Ta \&No Ta \&No Ta 0
.It Sx \&Rv Ta \&No Ta \&No Ta n
-.It Sx \&Sm Ta \&No Ta \&No Ta 1
+.It Sx \&Sm Ta \&No Ta \&No Ta <2
.It Sx \&St Ta \&No Ta Yes Ta 1
.It Sx \&Sx Ta Yes Ta Yes Ta >0
.It Sx \&Sy Ta Yes Ta Yes Ta >0