428 lines
174 KiB
Plaintext
428 lines
174 KiB
Plaintext
Copyright (c) 1986 Xerox Corporation. All rights reserved.
|
||
|
||
26.5.4 Special Prettyprint Controls
|
||
1
|
||
|
||
PRETTYTABFLG [Variable]
|
||
1
|
||
|
||
In order to save space on files, tabs are used instead of spaces for the inital spaces on each line, assuming that each tab corresponds to 8 spaces. This results in a reduction of file size by about 30%. Tabs are not used if PRETTYTABFLG is set to NIL (initially T).
|
||
1
|
||
|
||
#RPARS [Variable]
|
||
1
|
||
|
||
Controls the number of right parentheses necessary for square bracketing to occur. If #RPARS=NIL, no brackets are used. #RPARS is initialized to 4.
|
||
1
|
||
|
||
FIRSTCOL [Variable]
|
||
1
|
||
|
||
The starting column for comments. Comments run between FIRSTCOL and the line length set by LINELENGTH (("LINELENGTH" . Function)). If a word in a comment ends with a "." and is not on the list ABBREVLST, and the position is greater than halfway between FIRSTCOL and LINELENGTH, the next word in the comment begins on a new line. Also, if a list is encountered in a comment, and the position is greater than halfway, the list begins on a new line.
|
||
1
|
||
|
||
PRETTYLCOM [Variable]
|
||
1
|
||
|
||
If a comment has more than PRETTYLCOM elements (using COUNT), it is printed starting at column 10, instead of FIRSTCOL. Comments are also printed starting at column 10 if their second element is also a *, i.e., comments of the form (* * --).
|
||
1
|
||
|
||
#CAREFULCOLUMNS [Variable]
|
||
1
|
||
|
||
In the interests of efficiency, PRETTYPRINT approximates the number of characters in each atom, rather than calling NCHARS, when computing how much will fit on a line. This procedure works satisfactorily in most cases. However, users with unusually long atoms in their programs, e.g., such as produced by CLISPIFY, may occasionlly encounter some glitches in the output produced by PRETTYPRINT. The value of #CAREFULCOLUMNS tells PRETTYPRINT how many columns (counting from the right hand margin) in which to actually compute NCHARS instead of approximating. Setting #CAREFULCOLUMNS to 20 or 30 will eliminate the glitches, although it will slow down PRETTYPRINT slightly. #CAREFULCOLUMNS is initially 0.
|
||
1
|
||
|
||
(WIDEPAPER FLG) [Function]
|
||
1
|
||
|
||
(WIDEPAPER T) sets FILELINELENGTH (("FILELINELENGTH" . Variable)), FIRSTCOL, and PRETTYLCOM to large values appropriate for pretty printing files to be listed on wide paper. (WIDEPAPER) restores these parameters to their initial values. WIDEPAPER returns the previous setting of FLG.
|
||
1
|
||
|
||
PRETTYFLG [Variable]
|
||
1
|
||
|
||
If PRETTYFLG is NIL, PRINTDEF uses PRIN2 instead of prettyprinting. This is useful for producing a fast symbolic dump (see the FAST option of MAKEFILE, ("MAKEFILE" . Function)). Note that the file loads the same as if it were prettyprinted. PRETTYFLG is initially set to T. PRETTYFLG should not be set to NIL if comment pointers (("CommentPointer" . TAG)) are being used.
|
||
1
|
||
|
||
CLISPIFYPRETTYFLG [Variable]
|
||
1
|
||
|
||
Used to inform PRETTYPRINT to call CLISPIFY on selected function definitions before printing them (see ("CLISPIFYPRETTYFLG" . Variable)).
|
||
1
|
||
|
||
PRETTYPRINTMACROS [Variable]
|
||
1
|
||
|
||
An association-list that enables the user to control the formatting of selected expressions. CAR of each expression being PRETTYPRINTed is looked up on PRETTYPRINTMACROS, and if found, CDR of the corresponding entry is applied to the expression. If the result of this application is NIL, PRETTYPRINT ignores the expression; i.e., it prints nothing, assuming that the prettyprintmacro has done any desired printing. If the result of applying the prettyprint macro is non-NIL, the result is prettyprinted in the normal fashion. This gives the user the option of computing some other expression to be prettyprinted in its place.
|
||
Note: "prettyprinted in the normal fashion" includes processing prettyprint macros, unless the prettyprint macro returns a structure EQ to the one it was handed, in which case the potential recursion is broken.
|
||
1
|
||
|
||
PRETTYPRINTYPEMACROS [Variable]
|
||
1
|
||
|
||
A list of elements of the form (TYPENAME . FN). For types other than lists and atoms, the type name of each datum to be prettyprinted is looked up on PRETTYPRINTYPEMACROS, and if found, the corresponding function is applied to the datum about to be printed, instead of simply printing it with PRIN2.
|
||
1
|
||
|
||
PRETTYEQUIVLST [Variable]
|
||
1
|
||
|
||
An association-list that tells PRETTYPRINT to treat a CAR-of-form the same as some other CAR-of-form. For example, if (QLAMBDA . LAMBDA) appears on PRETTYEQUIVLST, then expressions beginning with QLAMBDA are prettyprinted the same as LAMBDAs. Currently, PRETTYEQUIVLST only allows (i.e., supports in an interesting way) equivalences to forms that PRETTYPRINT internally handles. Equivalence to forms for which the user has specified a prettyprint macro should be made by adding further entries to PRETTYPRINTMACROS
|
||
1
|
||
|
||
CHANGECHAR [Variable]
|
||
1
|
||
|
||
If non-NIL, and PRETTYPRINT is printing to a file or display terminal, PRETTYPRINT prints CHANGECHAR in the right hand margin while printing those expressions marked by the editor as having been changed (see ("EditorChangeMarks" . TAG)). CHANGECHAR is initially |.
|
||
1
|
||
|
||
|