Refining Pretty Style Mapping in Racket

The style mapping for a symbol controls the way that whitespace is inserted when printing a list that starts with the symbol.

The current documentation introduces various symbols. I think there's room for improvement.

Organizing Default Style Mapping

I suggest reorganizing the list to group symbols with similar styles to make them easier for readers to identify. For example:

'lambda 'λ
'define 'define-macro 'define-syntax
'syntax-rules
'shared
'unless 'when

'if 'set! 'set!-values

'cond 'case-lambda

'case 'class

'and 'or
'import 'export 'link
'require 'require-for-syntax 'require-for-template 'provide
'public 'private 'override 'rename 'inherit 'field 'init

'let 'letrec 'let*
'let-values 'letrec-values 'let*-values
'let-syntax 'letrec-syntax
'let-syntaxes 'letrec-syntaxes

'begin 'begin0

'do 'letrec-syntaxes+values

'module 'send

'syntax-case 'instantiate

'make-object

Removal of Unused Symbols

Some symbols listed in the documentation, such as define-macro, require-for-syntax, and require-for-template, are not defined in modern Racket. I think it's worth discussing whether these should be removed to avoid confusion.

Addition of New Symbols

I suggest considering the addition of new symbols to the default pretty style mapping. This would include symbols commonly used in Racket programming. For example:

struct struct/derived
define-struct define-struct/derived

case/equal
case/equal-always
case/eq
case/eqv

case-λ

define-values
define-syntaxes

syntax-case*

let/cc
let/ec

for
for/list
for/vector
for/hash
for/hasheq
for/hasheqv
for/hashalw
for/and
for/or
for/sum
for/product
for/lists
for/first
for/last
for/fold
for/foldr
for*
for*/list
for*/lists
for*/vector
for*/hash
for*/hasheq
for*/hasheqv
for*/hashalw
for*/and
for*/or
for*/sum
for*/product
for*/first
for*/last
for*/fold
for*/foldr
for/fold/derived
for*/fold/derived
for/foldr/derived
for*/foldr/derived

match
match*
match/values
define/match
match-lambda
match-lambda*
match-lambda**
match-λ
match-λ*
match-λ**
match-let
match-let*
match-let-values
match-let*-values
match-letrec
match-letrec-values
match-define
match-define-values

module+
module*

On one hand, changing the table of special symbols breacks backward compatibility.

On the other hand, I'd never use the space added automatically by pretty-print in something that is important.

(Mostly because I 'd never want to memorize the list and ensure that all the symbols that are important for me are in the list, and check it from time to time to ensure the symbols in my imaginary mental list and the symbols (changed) in the implementation are in sync.)