The VLISP formatter recognizes five types of AutoLISP comments, and positions each comment according to its type.
Visual LISP comment formatting |
|
---|---|
Comment |
Formatted appearance |
;| Inline |; |
The single-line comment appears after formatting as any other expression; the multiple-line comment appears starting at a new line |
; Single-Semicolon |
Starts at the comment-column position, as defined by the “Single-Semicolon comment indentation” format option |
;; Current-Column |
The comment appears starting on a new line, indented at the same level as the last line of program code |
;;; Heading or 0-Column |
Appears on a new line, without indentation |
;_ Function-Closing |
Appears just after the previous expression |
The following example demonstrates each comment style.
Initial text:
(defun foo (x)
;|inline comment |;
(list 1 2 3) ;comment-column comment
;;current-column comment
;;; heading or 0-column comment
) ;_ function-closing comment
Formatted text:
(defun foo (x) ;|inline comment |;
(list 1 2 3) ;comment-column comment
;;current-column comment
;;; heading or 0-column comment
) ;_ function-closing comment