From 816ebce1b19767f844269b2a739d216d1d05ce37 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Mon, 6 Mar 2017 20:46:39 -0700 Subject: [PATCH] Generalize load-ffi-quietly to use when loading other options. --- src/runtime/ffi.scm | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) 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 '()) -- 2.25.1