The less-familiar parts of Lisp for beginners — pprint-indent

We continue through our list of more obscure parts of Lisp, and our current focus on the pretty-printer, with pprint-indent.

This function must be called inside a pprint-logical-block block.  It has the effect of changing the indentation that will be used by the pretty-printer after the next newline.  There are two ways it can be used, with :BLOCK or with :CURRENT.

When called with the :BLOCK argument, this sets the indentation relative to the first character of the current block.  That is, if the current block can be thought of as a rectangular column between a left indent and a right margin, pprint-indent :BLOCK moves the left margin by an amount equal to its argument.  The argument can be negative, increasing the size of the printable column, but cannot push the left margin to the left of the end of the per-line prefix string, if any.

When called with the :CURRENT argument, this sets the indentation relative to the current position of the cursor on the line.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*

反垃圾邮件 / Anti-spam question * Time limit is exhausted. Please reload CAPTCHA.