From: Matt Birkholz Date: Tue, 7 Mar 2017 03:46:39 +0000 (-0700) Subject: Generalize load-ffi-quietly to use when loading other options. X-Git-Tag: mit-scheme-pucked-9.2.12~195^2~3 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=816ebce1b19767f844269b2a739d216d1d05ce37;p=mit-scheme.git Generalize load-ffi-quietly to use when loading other options. --- diff --git a/src/runtime/ffi.scm b/src/runtime/ffi.scm index c3f51eae8..35d70416b 100644 --- a/src/runtime/ffi.scm +++ b/src/runtime/ffi.scm @@ -589,29 +589,33 @@ USA. ;;; Build support, autoloaded (define (generate-shim library #!optional prefix) - (load-ffi-quietly) + (load-option-quietly 'ffi) ((environment-lookup (->environment '(ffi)) 'c-generate) library prefix)) (define (update-optiondb directory) - (load-ffi-quietly) + (load-option-quietly 'ffi) ((environment-lookup (->environment '(ffi)) 'update-optiondb) directory)) (define (update-html-index directory) - (load-ffi-quietly) + (load-option-quietly 'ffi) + (load-option-quietly 'regular-expression) ((environment-lookup (->environment '(ffi)) 'update-html-index) directory)) -(define (load-ffi-quietly) - (if (not (name->package '(FFI))) +(define (load-option-quietly name) + (if (not (name->package (list name))) (let ((kernel (lambda () (parameterize* (list (cons param:suppress-loading-message? #t)) (lambda () - (load-option 'FFI)))))) + (load-option name)))))) (if (nearest-cmdl/batch-mode?) (kernel) - (with-notification (lambda (port) - (write-string "Loading FFI option" port)) - kernel))))) + (with-notification + (lambda (port) + (write-string "Loading " port) + (write-string (string-upcase (symbol-name name)) port) + (write-string " option" port)) + kernel))))) (define calloutback-stack '())