disable syntax-coloring-triggered planet installs, for now

svn: r15609
This commit is contained in:
Matthew Flatt 2009-07-28 18:39:12 +00:00
parent d48332ed26
commit 12ab7c3aff

View File

@ -12,9 +12,16 @@
[(init) (file-position p)]
[(start-line start-col start-pos) (port-next-location p)])
(let ([get-info (with-handlers ([exn:fail? (lambda (exn) 'fail)])
;; FIXME: set the reader guard to disable access to
;; untrusted planet packages.
(read-language in (lambda () #f)))])
(parameterize ([current-reader-guard
(let ([old (current-reader-guard)])
(lambda (g)
(if (and (pair? g)
(eq? (car g) 'planet))
(error "#lang planet disbled")
(old g))))])
;; FIXME: set the reader guard to disable access to
;; untrusted planet packages.
(read-language in (lambda () #f))))])
(cond
[(procedure? get-info)
;; Produce language as first token: