adjust the code that checks to see if a file is in the module language so that it uses
read-language, in the case that the simpler check (that just looks for "#lang") fails.
please include in 5.2
(cherry picked from commit abf722f19a
)
This commit is contained in:
parent
97a1f3cd5c
commit
728153bb07
|
@ -58,7 +58,11 @@
|
|||
(: looks-like-module? ((Instance Text%) -> Boolean))
|
||||
(define (looks-like-module? text)
|
||||
(or (looks-like-new-module-style? text)
|
||||
(looks-like-old-module-style? text)))
|
||||
(looks-like-old-module-style? text)
|
||||
(with-handlers ((exn:fail? (λ (x) #f)))
|
||||
(procedure?
|
||||
(read-language (open-input-text-editor text 0 'end (λ (x) x) text #f)
|
||||
(λ () #f))))))
|
||||
|
||||
(: looks-like-old-module-style? ((Instance Text%) -> Boolean))
|
||||
(define (looks-like-old-module-style? text)
|
||||
|
|
Loading…
Reference in New Issue
Block a user