Commits

evhan committed 3426770

Document lispwords file support

  • Participants
  • Parent commits f2fa550

Comments (0)

Files changed (1)

File schematic-format.1.md

 
 # SYNOPSIS
 
-**schematic-format** \[*option* ...]
+**schematic-format** \[*option* ...] \[*indent-file*]
 
 # DESCRIPTION
 
 -v, --version
 :   Print version information to standard output and exit.
 
-# CAVEATS
+# INDENT FILE
+
+An *indent-file*, if given, may specify custom indentation rules. It
+should contain a single S-expression, which must be a list of
+indentation rules where each rule is one of the following forms:
+
+    (keyword . offset)
+    (keyword offset ...)
+
+Each `keyword` is a symbol specifying the head of the source forms for
+which to activate the rule, and each `offset` is an integer value
+specifying a (characterwise, columnar) offset from the previously-active
+indentation level to use for that form.
+
+For example, the rule `(receive 1)` would cause the body of each
+`receive` form to be indented one space beyond the head of the form:
 
-**schematic-format** only knows the keywords and identifiers specified
-by R7RS, and there is currently no way to specify additional indentation
-rules.
+    (receive 1) => (receive (a b) (foo bar)
+                     (baz a)
+                     (qux b))
+
+Rules with multiple offsets are applied to the form's data in order,
+with the final offset persisting until the form is closed:
+
+    (receive 3 3 1) => (receive
+                           (a b)
+                           (foo bar)
+                         (bar a)
+                         (qux b))
+
+Negative offsets are specifically allowed.
+
+# CAVEATS
 
 Tabbed indentation is unsupported. Leading tabs are rewritten as eight
 spaces.
 
 `cond`'s clauses are indented by one space beyond its opening
-parenthesis, which may surprise some Emacs users.
+parenthesis by default, which may surprise some Emacs users.
 
 Implementation-specific reader extensions such as here documents and
 alternative parenthetical syntaxes may not be handled nicely.