Base Formatting Options in the Format Options Dialog Box

AutoCAD AutoLISP & Visual LISP

 
Base Formatting Options in the Format Options Dialog Box
 
 
 

The following options are shown at the top of the Format Options dialog box.

Right Text Margin

Right margin for text. An expression prints on a single line if its last character position does not exceed the right margin.

Narrow Style Indentation

Sets the standard indentation value used in the Narrow Formatting Style for function arguments.

Maximum Wide-Style Car Length

Maximum length for function expressions in Wide Formatting Style. For longer expressions, the formatter always uses Narrow Formatting Style.

Single-Semicolon Comment Indentation

Identifies the left margin alignment for single-semicolon comments.

The Closing Paren Style group of options controls the position of closing parentheses for multi-line formatting styles. The effect of each option is demonstrated by formatting the following code, where Right Text Margin is set to 40 and Preserve Existing Line Breaks is not selected:

(cond  
 ((/= (logand mask flg) 0)
 (list (list txton)))
)

VLISP formats the preceding code as follows:

Close at the Same Line

(cond ((/= (logand mask flg) 0)

(list (list txton))))

Close at the New Line with Inner Indentation

(cond ((/= (logand mask flg) 0)

(list (list txton))

)

)

Close at The New Line with Outer Indentation

(cond ((/= (logand mask flg) 0)

(list (list txton))

)

)

The remaining items in this dialog box concern tabs, saving the current setting, and the setting of several comment options.

Insert Tabs

The VLISP formatter inserts tab characters instead of multiple space characters whenever possible.

Save Formatting Options in Source File

The VLISP formatter appends comments containing the current formatting settings to the end of the text in the VLISP text editor window. If you save these comments (and do not modify them), VLISP applies the saved formatting options to the text editor the next time you open the file.

Insert Form-Closing Comment

This option causes VLISP to add a closing comment to an expression when Close at the New Line with Inner Indentation or Close at the New Line with Outer Indentation is selected. The comment takes the following form at the end of a multi-line function:

;_ end of <function name>

VLISP does not add the comment if the line already contains a comment.

Form-Closing Comment Prefix

Determines the text to be included when Insert Form-Closing Comment is selected.