Skip to content

Commit

Permalink
change some single-character identifiers to use scheme-normal-indent
Browse files Browse the repository at this point in the history
  • Loading branch information
payneca committed Jul 13, 2022
1 parent 3f869cd commit ffe9aa8
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
49 changes: 49 additions & 0 deletions indent.ms
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,55 @@
"(let f () ...))"))
)

(indent-mat single-character-identifiers ()
(for-each
(lambda (id)
(check-indent
(code
(format "(~a" id)
" test1"
" test2"
" test3)")
(code
(format "(~a" id)
"test1"
"test2"
"test3)"))
(check-indent
(code
(format "(~a test1" id)
" test2"
" test3)")
(code
(format "(~a test1" id)
"test2"
"test3)")))
'("a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m"
"n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z"))
(for-each
(lambda (id)
(check-indent
(code
(format "(~a" id)
" test1"
" test2"
" test3)")
(code
(format "(~a" id)
"test1"
"test2"
"test3)"))
(check-indent
(code
(format "(~a test1" id)
" test2"
" test3)")
(code
(format "(~a test1" id)
"test2"
"test3)")))
'("!" "@" "$" "%" "^" "&" ":" "?" "~" "_" "*" "/" "+" "-")))

;; This header is handy in Emacs with column-number-mode to look
;; closely at alignment.
(define align-header
Expand Down
1 change: 1 addition & 0 deletions indent.ss
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@
1]
;; Manual updates to style
[(call-with-values) 0]
[(! @ $ % ^ & : ? ~ _) scheme-normal-indent]
)

(define (emit-whitespace op n)
Expand Down

0 comments on commit ffe9aa8

Please sign in to comment.