get-module-suffixes: put "rkt" first

Putting "rkt" first in the list makes it likely to act as
a default, such as for a `put-file` dialog.
This commit is contained in:
Matthew Flatt 2015-12-22 11:02:54 -07:00
parent 9bdbd14b96
commit 2b10262258

View File

@ -44,7 +44,14 @@
(cond
[(bytes? suffix) (hash-set ht suffix #t)]
[else ht]))]))))
(sort (hash-keys ht) bytes<?))
(sort (hash-keys ht)
;; Order ".rkt" before everything else, so that it
;; tends to be the default:
(lambda (a b)
(cond
[(bytes=? #"rkt" a) #t]
[(bytes=? #"rkt" b) #f]
[else (bytes<? a b)]))))
(define (get-module-suffix-regexp #:mode [key 'preferred]
#:group [group 'all]