minor edits

svn: r6195

original commit: 234a617835
This commit is contained in:
Eli Barzilay 2007-05-10 22:03:05 +00:00
parent 3c2a10cc05
commit 42c11db0ff

View File

@ -12,11 +12,11 @@
(define unix-browser-list '(firefox galeon opera netscape mozilla dillo)) (define unix-browser-list '(firefox galeon opera netscape mozilla dillo))
; : any -> bool ;; : any -> bool
(define (custom-browser? x) (define (custom-browser? x)
(and (pair? x) (string? (car x)) (string? (cdr x)))) (and (pair? x) (string? (car x)) (string? (cdr x))))
; : any -> bool ;; : any -> bool
(define (browser-preference? x) (define (browser-preference? x)
(or (not x) (eq? 'plt x) (memq x unix-browser-list) (custom-browser? x) (or (not x) (eq? 'plt x) (memq x unix-browser-list) (custom-browser? x)
(procedure? x))) (procedure? x)))
@ -27,7 +27,7 @@
(lambda (x) (lambda (x)
(if (browser-preference? x) (if (browser-preference? x)
x x
(error 'external-browser "~a is not a valid browser preference" x))))) (error 'external-browser "~e is not a valid browser preference" x)))))
;; like (system-type), but return the real OS for OSX with XonX ;; like (system-type), but return the real OS for OSX with XonX
;; (could do the same for Cygwin, but that it doesn't have shell-execute) ;; (could do the same for Cygwin, but that it doesn't have shell-execute)