.
original commit: 8f247a6b6336687198bcc7fcbf00f14158f89b78
This commit is contained in:
parent
f3889f341e
commit
dbbed8f02c
|
@ -14,12 +14,15 @@
|
|||
(opt-lambda (str [separate-window? separate-by-default?])
|
||||
; The with-handler reverts to the old error port before printing raised error messages.
|
||||
(with-handlers ([void (lambda (exn) (raise exn))])
|
||||
(printf "trying!~n")
|
||||
(parameterize ([current-input-port null-input]
|
||||
[current-error-port null-output]
|
||||
[current-output-port null-output])
|
||||
(cond
|
||||
[(eq? (system-type) 'macos)
|
||||
(let loop ([l '("NAVG" "MSIE")])
|
||||
(if (regexp-match "Blue Box" (system-type #t))
|
||||
;; Classic inside OS X:
|
||||
(let loop ([l '("MSIE" "NAVG")])
|
||||
(if (null? l)
|
||||
(error 'send-url "couldn't start Internet Explorer or Netscape")
|
||||
(with-handlers ([not-break-exn? (lambda (x) (loop (cdr l)))])
|
||||
|
@ -34,7 +37,9 @@
|
|||
(object-wait-multiple 1 t) ;; <<< Yuck (timeout) <<<
|
||||
(when (thread-running? t)
|
||||
(kill-thread t)
|
||||
(error "timeout")))))))))]
|
||||
(error "timeout")))))))))
|
||||
;; Normal OS Classic:
|
||||
(send-event "MACS" "GURL" "GURL" str))]
|
||||
[(or (eq? (system-type) 'macosx)
|
||||
(equal? "ppc-macosxonx" (system-library-subpath)))
|
||||
(system (format "osascript -e 'open location \"~a\"'" str))]
|
||||
|
|
Loading…
Reference in New Issue
Block a user