PR 7702
svn: r1407
This commit is contained in:
parent
27ed4f49ec
commit
90d07d845c
|
@ -247,23 +247,31 @@
|
|||
(drscheme:unit:open-drscheme-window filename))])
|
||||
drscheme-current-create-new-window))
|
||||
|
||||
;; add a catch-all handler to open drscheme files
|
||||
(handler:insert-format-handler
|
||||
"Units"
|
||||
(λ (filename) #t)
|
||||
drscheme:unit:open-drscheme-window)
|
||||
|
||||
;; add a handler to open .plt files.
|
||||
(handler:insert-format-handler
|
||||
"PLT Files"
|
||||
(λ (filename)
|
||||
(and (equal? "plt" (filename-extension filename))
|
||||
(gui-utils:get-choice
|
||||
(format (string-constant install-plt-file) filename)
|
||||
(string-constant install-plt-file/yes)
|
||||
(string-constant install-plt-file/no))))
|
||||
(let ([ext (filename-extension filename)])
|
||||
(and ext
|
||||
(or (bytes=? #"PLT" ext)
|
||||
(bytes=? #"plt" ext))
|
||||
(gui-utils:get-choice
|
||||
(format (string-constant install-plt-file) filename)
|
||||
(string-constant install-plt-file/yes)
|
||||
(string-constant install-plt-file/no)))))
|
||||
(λ (filename)
|
||||
(run-installer filename)
|
||||
#f))
|
||||
|
||||
(drscheme:tools:load/invoke-all-tools
|
||||
(λ ()
|
||||
(void))
|
||||
(λ ()
|
||||
(λ () (void))
|
||||
(λ ()
|
||||
(drscheme:language-configuration:add-built-in-languages)
|
||||
(drscheme:module-language:add-module-language)
|
||||
(drscheme:language-configuration:add-info-specified-languages)))
|
||||
|
|
|
@ -3072,9 +3072,4 @@ module browser threading seems wrong.
|
|||
[frame (new drs-frame% (filename filename))])
|
||||
(send (send frame get-interactions-text) initialize-console)
|
||||
(send frame show #t)
|
||||
frame))
|
||||
|
||||
(handler:insert-format-handler
|
||||
"Units"
|
||||
(λ (filename) #t)
|
||||
open-drscheme-window))))
|
||||
frame)))))
|
||||
|
|
|
@ -722,7 +722,9 @@
|
|||
". If \\var{pred} is a list of strings, they are each matched with the extension of a filename by"
|
||||
"@flink handler:find-format-handler %"
|
||||
". If it is a function, the filename is applied to the function and the"
|
||||
"functions result determines if this is the handler to use.")
|
||||
"functions result determines if this is the handler to use."
|
||||
""
|
||||
"The most recently added format handler takes precedence over all other format handlers.")
|
||||
(handler:find-named-format-handler
|
||||
(string? . -> . (path? . -> . (is-a?/c frame:editor<%>)))
|
||||
(name)
|
||||
|
|
Loading…
Reference in New Issue
Block a user