diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-08-04 20:29:12 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-08-04 20:29:12 -0700 |
commit | c3b2ec8a4d4eb7419a748b939da7657e01aada99 (patch) | |
tree | 819afc8e577434b921c0c24cd4d0a1e6bd767d36 /txr.1 | |
parent | bfbad3fd2a3ba5af46e547c5e1f7cb72b25162a8 (diff) | |
download | txr-c3b2ec8a4d4eb7419a748b939da7657e01aada99.tar.gz txr-c3b2ec8a4d4eb7419a748b939da7657e01aada99.tar.bz2 txr-c3b2ec8a4d4eb7419a748b939da7657e01aada99.zip |
* stream.c (vformat): Implement ~! format directive for indentation.
Allow negative widths to be specified with a leading minus sign,
so that we can indent to the left.
* txr.1: Document ~! format directive.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 38 |
1 files changed, 35 insertions, 3 deletions
@@ -26887,13 +26887,14 @@ this field. If the character is present, the printing will be centered within the field. Otherwise it will be right-adjusted by default. -The width can be specified as a decimal integer, or as the character +The width can be specified as a decimal integer with an optional leading +minus sign, or as the character .codn * . The .code * notation means that instead of digits, the value of the next argument is -consumed, and expected to be an integer which specifies the width. If that -integer value is negative, then the field will be left-adjusted. +consumed, and expected to be an integer which specifies the width. If the +width, specified either way, is negative, then the field will be left-adjusted. If the value is positive, but either the .code < or @@ -27090,6 +27091,37 @@ of \*(TX. If the object is a pointer to heaped data, that value has a correspondence to its address. .RE +.coIP ! +The +.code ! +directive establishes hanging indentation, and turns on the stream's +indentation mode. Subsequent lines printed within the execution of the +same +.code format +call will be automatically indented. If no width is specified, then +the directive sets the hanging indentation to the current printing +column position. If a width is specified, then it represents an offset +(positive or negative). If the +.code < +prefix character is present, the hanging indentation is set to the +specified offset relative to the current printing column. +If the +.code < +prefix is present on the width field, then the offset is applied +relative to the indentation which was saved on entry into the +.code format +function. + +The indentation mode and indentation column are automatically restored to their +previous values when +.code format +function terminates, naturally or via an exception or non-local jump. + +The effect of a precision field (even if zero) combined with the +.code ! +directive is currently not specified, and reserved for future extension. +The precision field is processed syntactically, and no error occurs, however. + .PP .coNP Functions @, print @, pprint @, prinl @, pprinl @ tostring and @ tostringp |