gtk: Fix load-option/suppress-loading-message?.
authorMatt Birkholz <puck@birchwood-abbey.net>
Sun, 19 Oct 2014 17:49:02 +0000 (10:49 -0700)
committerMatt Birkholz <puck@birchwood-abbey.net>
Sun, 19 Oct 2014 17:49:02 +0000 (10:49 -0700)
The implementation in 56128b0 (a year ago!) was silly; it only
suppressed half a notification, producing an unbalanced "... done".

src/runtime/option.scm

index e2eff9432ea5a9e388566b21c7fc13fa574a366d..73b1d3fa8404bdfaac2a7e6f347d22c3059f142b 100644 (file)
@@ -40,21 +40,18 @@ USA.
            ((not no-error?) (error "Unknown option name:" name))
            (else #f)))
 
-    (define (notifier option)
-      (named-lambda (notify port)
-       (if (not (fluid load-option/suppress-loading-message?))
-           (begin
-             (write-string "Loading " port)
-             (write-string (symbol-name option) port)
-             (write-string " option" port)))))
-
     (define (load-entry entry)
-      (with-notification
-       (notifier name)
-       (lambda ()
-        (let-fluid load/suppress-loading-message? #t
-          (lambda ()
-            (for-each (lambda (thunk) (thunk)) (cdr entry))))))
+      (let-fluid load/suppress-loading-message? #t
+       (lambda ()
+         (if load-option/suppress-loading-message?
+             (for-each (lambda (thunk) (thunk)) (cdr entry))
+             (with-notification
+              (named-lambda (load-optoin-notify port)
+                (write-string "Loading " port)
+                (write-string (symbol-name name) port)
+                (write-string " option" port))
+              (lambda ()
+                (for-each (lambda (thunk) (thunk)) (cdr entry)))))))
       (set! loaded-options (cons name loaded-options))
       name)