293 lines
No EOL
6.5 KiB
HTML
293 lines
No EOL
6.5 KiB
HTML
<!DOCTYPE HTML>
|
|
<HTML LANG="en-us"
|
|
><HEAD
|
|
><TITLE
|
|
>pprint-indent | Common Lisp Nova Spec</TITLE
|
|
><META CHARSET="US-ASCII"
|
|
><LINK REL="canonical" HREF="f_pprint-indent.html"
|
|
><LINK REL="next" HREF="f_pprint-logical-block.html" TYPE="text/html" TITLE="pprint-logical-block"
|
|
><LINK REL="prev" HREF="f_pprint-fill.html" TYPE="text/html" TITLE="pprint-fill, pprint-linear, pprint-tabular"
|
|
><LINK REL="up" HREF="22_4_Printer_Dictionary.html" TYPE="text/html" TITLE="22.4 Printer Dictionary"
|
|
><LINK REL="start" HREF="index.html" TYPE="text/html" TITLE="Common Lisp Nova Spec"
|
|
><META NAME="VIEWPORT" CONTENT="width=device-width, initial-scale=1.0"
|
|
><LINK REL="STYLESHEET" HREF="dpans.css%3F3909942064.css"
|
|
><SCRIPT SRC="dpans.js%3F3909942064"
|
|
></SCRIPT
|
|
><SCRIPT SRC="apropos.js%3F3909942064"
|
|
></SCRIPT
|
|
></HEAD
|
|
><BODY
|
|
><DIV
|
|
><DIV CLASS="topnav"
|
|
><DIV CLASS="breadcrumb"
|
|
><SPAN CLASS="breadcrumb-item"
|
|
><A HREF="index.html"
|
|
>Common Lisp Nova Spec</A
|
|
></SPAN
|
|
> <SPAN CLASS="breadcrumb-item"
|
|
>→ <A HREF="22_Printer.html"
|
|
>22. Printer</A
|
|
></SPAN
|
|
> <SPAN CLASS="breadcrumb-item"
|
|
>→ <A HREF="22_4_Printer_Dictionary.html"
|
|
>22.4 Printer Dictionary</A
|
|
></SPAN
|
|
> <SPAN CLASS="breadcrumb-item"
|
|
>→ <A HREF="f_pprint-indent.html"
|
|
>pprint-indent</A
|
|
></SPAN
|
|
></DIV
|
|
><DIV CLASS="apropos"
|
|
><DIV CLASS="apropos-io"
|
|
><A HREF="f_pprint-fill.html" CLASS="prev"
|
|
>←</A
|
|
><SPAN ID="apropos-label"
|
|
>Apropos </SPAN
|
|
><INPUT ID="apropos" AUTOFOCUS="AUTOFOCUS" PLACEHOLDER="Type here to search" ONINPUT="aproposInput(this);" ONKEYUP="aproposKeyup(event);" ONCHANGE="aproposChange(this);" ONFOCUS="aproposFocus(this);" ONFOCUSOUT="aproposFocusout(this);"
|
|
><A HREF="f_pprint-logical-block.html" CLASS="next"
|
|
>→</A
|
|
></DIV
|
|
><DIV ID="apropos-res"
|
|
></DIV
|
|
></DIV
|
|
></DIV
|
|
><DIV CLASS="matter"
|
|
><DIV CLASS="com"
|
|
><DIV CLASS="begincom"
|
|
><HR
|
|
><TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0"
|
|
><TR
|
|
><TD ALIGN="LEFT" VALIGN="BASELINE" WIDTH="100%" CLASS="name"
|
|
><SPAN CLASS="idx" DATA-KIND="idxref" DATA-TERM="pprint-indent"
|
|
></SPAN
|
|
><B
|
|
>pprint-indent</B
|
|
></TD
|
|
><TD ALIGN="RIGHT" VALIGN="BASELINE" WIDTH="0" NOWRAP="NOWRAP" CLASS="ftype"
|
|
><I
|
|
>Function</I
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
></DIV
|
|
><UL CLASS="subtoc"
|
|
></UL
|
|
><DL
|
|
><DT
|
|
><B
|
|
>Syntax</B
|
|
></DT
|
|
><DD
|
|
><P CLASS="j"
|
|
><B
|
|
>pprint-indent</B
|
|
> <SPAN CLASS="cmssi"
|
|
>relative-to</SPAN
|
|
> <SPAN CLASS="cmssi"
|
|
>n</SPAN
|
|
> <SPAN CLASS="cmtt"
|
|
>&optional</SPAN
|
|
> <SPAN CLASS="cmssi"
|
|
>stream</SPAN
|
|
> <SPAN CLASS="arrow"
|
|
>→</SPAN
|
|
> <SPAN CLASS="misc"
|
|
><B
|
|
>nil</B
|
|
></SPAN
|
|
></P
|
|
></DD
|
|
><DT
|
|
><B
|
|
>Arguments and Values</B
|
|
></DT
|
|
><DD
|
|
><P CLASS="j"
|
|
><VAR CLASS="param"
|
|
>relative-to</VAR
|
|
> — either <SPAN CLASS="kwd"
|
|
><SPAN CLASS="cmtt"
|
|
>:block</SPAN
|
|
></SPAN
|
|
> or <SPAN CLASS="kwd"
|
|
><SPAN CLASS="cmtt"
|
|
>:current</SPAN
|
|
></SPAN
|
|
>. </P
|
|
><P CLASS="j"
|
|
><VAR CLASS="param"
|
|
>n</VAR
|
|
> — a <EM CLASS="term"
|
|
>real</EM
|
|
>. </P
|
|
><P CLASS="j"
|
|
><VAR CLASS="param"
|
|
>stream</VAR
|
|
> — an <A HREF="26_1_Glossary.html#output"
|
|
><EM CLASS="term"
|
|
>output</EM
|
|
></A
|
|
> <A HREF="26_1_Glossary.html#stream_designator"
|
|
><EM CLASS="term"
|
|
>stream designator</EM
|
|
></A
|
|
>. The default is <A HREF="26_1_Glossary.html#standard_output"
|
|
><EM CLASS="term"
|
|
>standard output</EM
|
|
></A
|
|
>.</P
|
|
></DD
|
|
><DT
|
|
><B
|
|
>Description</B
|
|
></DT
|
|
><DD
|
|
><P CLASS="j"
|
|
><A HREF="f_pprint-indent.html" CLASS="funref"
|
|
><B
|
|
>pprint-indent</B
|
|
></A
|
|
> specifies the indentation to use in a logical block on <A HREF="26_1_Glossary.html#stream"
|
|
><EM CLASS="term"
|
|
>stream</EM
|
|
></A
|
|
>. If <VAR CLASS="param"
|
|
>stream</VAR
|
|
> is a <A HREF="26_1_Glossary.html#pretty_printing_stream"
|
|
><EM CLASS="term"
|
|
>pretty printing stream</EM
|
|
></A
|
|
> and the <A HREF="26_1_Glossary.html#value"
|
|
><EM CLASS="term"
|
|
>value</EM
|
|
></A
|
|
> of <A HREF="v_print-pretty.html" CLASS="misc"
|
|
><B
|
|
>*print-pretty*</B
|
|
></A
|
|
> is <A HREF="26_1_Glossary.html#true"
|
|
><EM CLASS="term"
|
|
>true</EM
|
|
></A
|
|
>, <A HREF="f_pprint-indent.html" CLASS="funref"
|
|
><B
|
|
>pprint-indent</B
|
|
></A
|
|
> sets the indentation in the innermost dynamically enclosing logical block; otherwise, <A HREF="f_pprint-indent.html" CLASS="funref"
|
|
><B
|
|
>pprint-indent</B
|
|
></A
|
|
> has no effect. </P
|
|
><P CLASS="j"
|
|
><VAR CLASS="param"
|
|
>N</VAR
|
|
> specifies the indentation in <A HREF="26_1_Glossary.html#em"
|
|
><EM CLASS="term"
|
|
>ems</EM
|
|
></A
|
|
>. If <VAR CLASS="param"
|
|
>relative-to</VAR
|
|
> is <SPAN CLASS="kwd"
|
|
><SPAN CLASS="cmtt"
|
|
>:block</SPAN
|
|
></SPAN
|
|
>, the indentation is set to the horizontal position of the first character in the <EM CLASS="term"
|
|
>dynamically current logical block</EM
|
|
> plus <VAR CLASS="param"
|
|
>n</VAR
|
|
> <A HREF="26_1_Glossary.html#em"
|
|
><EM CLASS="term"
|
|
>ems</EM
|
|
></A
|
|
>. If <VAR CLASS="param"
|
|
>relative-to</VAR
|
|
> is <SPAN CLASS="kwd"
|
|
><SPAN CLASS="cmtt"
|
|
>:current</SPAN
|
|
></SPAN
|
|
>, the indentation is set to the current output position plus <VAR CLASS="param"
|
|
>n</VAR
|
|
> <A HREF="26_1_Glossary.html#em"
|
|
><EM CLASS="term"
|
|
>ems</EM
|
|
></A
|
|
>. (For robustness in the face of variable-width fonts, it is advisable to use <SPAN CLASS="kwd"
|
|
><SPAN CLASS="cmtt"
|
|
>:current</SPAN
|
|
></SPAN
|
|
> with an <VAR CLASS="param"
|
|
>n</VAR
|
|
> of zero whenever possible.) </P
|
|
><P CLASS="j"
|
|
><VAR CLASS="param"
|
|
>N</VAR
|
|
> can be negative; however, the total indentation cannot be moved left of the beginning of the line or left of the end of the rightmost per-line prefix — an attempt to move beyond one of these limits is treated the same as an attempt to move to that limit. Changes in indentation caused by <VAR CLASS="param"
|
|
>pprint-indent</VAR
|
|
> do not take effect until after the next line break. In addition, in miser mode all calls to <A HREF="f_pprint-indent.html" CLASS="funref"
|
|
><B
|
|
>pprint-indent</B
|
|
></A
|
|
> are ignored, forcing the lines corresponding to the logical block to line up under the first character in the block.</P
|
|
></DD
|
|
><DT
|
|
><B
|
|
>Exceptional Situations</B
|
|
></DT
|
|
><DD
|
|
><P CLASS="j"
|
|
>An error is signaled if <VAR CLASS="param"
|
|
>relative-to</VAR
|
|
> is any <A HREF="26_1_Glossary.html#object"
|
|
><EM CLASS="term"
|
|
>object</EM
|
|
></A
|
|
> other than <SPAN CLASS="kwd"
|
|
><SPAN CLASS="cmtt"
|
|
>:block</SPAN
|
|
></SPAN
|
|
> or <SPAN CLASS="kwd"
|
|
><SPAN CLASS="cmtt"
|
|
>:current</SPAN
|
|
></SPAN
|
|
>.</P
|
|
></DD
|
|
><DT
|
|
><B
|
|
>See Also</B
|
|
></DT
|
|
><DD
|
|
><P CLASS="j"
|
|
><A HREF="22_3_Formatted_Output.html#sec_22_3_5_3" CLASS="secref"
|
|
><SPAN CLASS="cmr"
|
|
>Section</SPAN
|
|
> <SPAN CLASS="cmr"
|
|
>22.3.5.3</SPAN
|
|
> <SPAN CLASS="cmr"
|
|
>(Tilde</SPAN
|
|
> <SPAN CLASS="cmr"
|
|
>I:</SPAN
|
|
> <SPAN CLASS="cmr"
|
|
>Indent)</SPAN
|
|
></A
|
|
></P
|
|
></DD
|
|
></DL
|
|
></DIV
|
|
></DIV
|
|
><DIV CLASS="footer"
|
|
><DIV CLASS="btmnav"
|
|
><A HREF="f_pprint-fill.html" CLASS="prev"
|
|
>←</A
|
|
><A HREF="f_pprint-logical-block.html" CLASS="next"
|
|
>→</A
|
|
></DIV
|
|
><DIV CLASS="trail"
|
|
>Conversion to HTML copyright 2023 by Gilbert Baumann</DIV
|
|
></DIV
|
|
></DIV
|
|
><SCRIPT
|
|
>domReady();</SCRIPT
|
|
></BODY
|
|
></HTML
|
|
> |