Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document drracket:comment-delimiters #635

Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drracket/info.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

(define pkg-authors '(robby))

(define version "1.14")
(define version "1.15")

(define license
'(Apache-2.0 OR MIT))
31 changes: 31 additions & 0 deletions drracket/scribblings/tools/lang-tools.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,37 @@ The default value is @racket[(list #\" #\|)].
@history[#:added "1.10"]
}

@section{Comments}

@language-info-def[drracket:comment-delimiters]{

When a language's @racket[_get-info] procedure responds to
@racket['drracket:comment-delimiters], it is expected to return a list
of comment styles. Each comment style is expressed as a list of three
strings:

@itemlist[

@item{The characters used to start/open a comment.}

@item{The characters used to end/close a comment. May be @litchar[""] to mean newline.}

@item{Padding to add after the start and before the close.}
]

These values are used by comment and un-comment commands.

The default value is @racket[(list (list ";;" "" " ") (list "#|" "|#" " "))].

When the list has multiple styles, some tools may present them for
the user to pick one. Other tools may default to using the first style
in the list (the user will configure a preference by others means).
Therefore when a language supports multiple comment styles, it should
list the most popular or preferred style first.

@history[#:added "1.15"]
}

@section{Keystrokes}

@language-info-def[drracket:keystrokes]{
Expand Down