diff --git a/collects/help/private/manuals.ss b/collects/help/private/manuals.ss
index 4661221900..7f3ae0b596 100644
--- a/collects/help/private/manuals.ss
+++ b/collects/help/private/manuals.ss
@@ -118,49 +118,34 @@
compare-docs)]
[names (map get-doc-name docs)]
[names+paths (map cons names docs)])
- (let-values ([(collections-doc-files collection-names) (colldocs)])
- (apply
- string-append
- ""
- (xexpr->string `(HEAD ,hd-css ,@hd-links (TITLE "PLT Manuals")))
- "
"
-
- (append
-
- (list "Installed Manuals
")
- (if (repos-or-nightly-build?)
- (list
- "Subversion: "
- (string-constant plt:hd:refresh-all-manuals)
- " "
- (format "flush index and keyword cache
" flush-manuals-url))
- '())
- (build-known-manuals names+paths)
-
- (list "Doc.txt
")
- (map
- (lambda (collection-doc-file name)
- (let ([path (build-path (car collection-doc-file)
- (cadr collection-doc-file))])
- (format "- ~a"
- (if (file-exists? path)
- (format "~a collection"
- ;; escape colons and other junk
- (uri-encode (path->string path))
- (uri-encode name)
- (uri-encode name)
- name)
- (format "~a collection: specified doc.txt file (~a) not found"
- name path)))))
- collections-doc-files
- collection-names)
- (list "
")
-
- (let ([uninstalled (get-uninstalled docs)])
- (if (null? uninstalled)
+ (apply
+ string-append
+ ""
+ (xexpr->string `(HEAD ,hd-css ,@hd-links (TITLE "PLT Manuals")))
+ ""
+
+ (append
+
+ (list "Installed Manuals
")
+ (if (repos-or-nightly-build?)
+ (list
+ "Subversion: "
+ (string-constant plt:hd:refresh-all-manuals)
+ " "
+ (format "flush index and keyword cache
" flush-manuals-url))
+ '())
+ (build-known-manuals names+paths)
+
+ (list "Doc.txt
")
+ (doc.txt-manuals)
+
+ (list "
")
+
+ (let ([uninstalled (get-uninstalled docs)])
+ (if (null? uninstalled)
`("")
`("Uninstalled Manuals
"
""
@@ -180,11 +165,34 @@
(if (and manual-path
(or (file-exists? (build-path manual-path "hdindex"))
(file-exists? (build-path manual-path "keywords"))))
- " (index installed)"
- "")))))
+ " (index installed)"
+ "")))))
uninstalled)
"
")))
- (list ""))))))
+ (list "")))))
+
+ (define (doc.txt-manuals)
+ (let-values ([(collections-doc-files collection-names) (colldocs)])
+ (let ([name/html-pairs
+ (map
+ (lambda (collection-doc-file name)
+ (cons
+ name
+ (let ([path (build-path (car collection-doc-file)
+ (cadr collection-doc-file))])
+ (format " ~a"
+ (if (file-exists? path)
+ (format "~a collection"
+ ;; escape colons and other junk
+ (uri-encode (path->string path))
+ (uri-encode name)
+ (uri-encode name)
+ name)
+ (format "~a collection: specified doc.txt file (~a) not found"
+ name path))))))
+ collections-doc-files
+ collection-names)])
+ (map cdr (sort name/html-pairs (λ (x y) (string<=? (car x) (car y))))))))
;; break-between : regexp
;; (listof (union string (cons string string)))