doc/: Align backslashes in C-macros by the right-hand margin.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 22 Jul 2017 17:13:31 +0000 (18:13 +0100)
Do this in the source, and in the typeset code.

doc/runtime.tex
doc/sod.sty

index 75055e5..d4a8292 100644 (file)
@@ -203,8 +203,8 @@ list items of the form
 \end{prog}
 with no separation between them.  For example:
 \begin{prog}
-  \#define example_KWSET(_) @\\                                 \\ \ind
-    _(int, x, 0) @\\                                            \\
+  \#define example_KWSET(_)                             \macsl  \\ \ind
+    _(int, x, 0)                                        \macsl  \\
     _(const char *, y, NULL)
 \end{prog}
 
@@ -562,16 +562,16 @@ particular keyword argument.
     else longjmp(kw_test_jmp, 2);                             \-\\
   \}                                                            \\+
 
-  \#define KW_TEST(flag, set, call) do \{ @\\                   \\ \ind
-    kw_unkhookfn *oldunk = kw_unkhook; @\\                      \\
-    kw_unkhook = kw_test_unknown; @\\                           \\
-    switch (setjmp(kw_test_jmp)) \{ @\\                         \\ \ind
-      case 0: call; abort(); @\\                                \\
-      case 1: flag = 1; break; @\\                              \\
-      case 2: flag = 0; break; @\\                              \\
-      default: abort(); @\\                                   \-\\
-    \} @\\                                                      \\
-    kw_unkhook = oldunk; @\\                                  \-\\
+  \#define KW_TEST(flag, set, call) do \{               \macsl  \\ \ind
+    kw_unkhookfn *oldunk = kw_unkhook;                  \macsl  \\
+    kw_unkhook = kw_test_unknown;                       \macsl  \\
+    switch (setjmp(kw_test_jmp)) \{                     \macsl  \\ \ind
+      case 0: call; abort();                            \macsl  \\
+      case 1: flag = 1; break;                          \macsl  \\
+      case 2: flag = 0; break;                          \macsl  \\
+      default: abort();                                 \macsl\-\\
+    \}                                                  \macsl  \\
+    kw_unkhook = oldunk;                                \macsl\-\\
   \} while (0)                                                  \\+
 
   @/* Example of use */                                         \\
index 1f653c9..f1ba880 100644 (file)
 \def\@progcr@ii#1{\csname @progcr@#1\endcsname\ignorespaces}
 \@namedef{@progcr@+}{\prog@@cr[\medskipamount]}
 \@namedef{@progcr@-}{\prog@@cr*[\jot]}
+\def\macsl{\`\textbackslash\hskip\leftmargin}
 
 %% Put a chunk of text in a box.
 \newenvironment{boxy}[1][\q@]{%