Commits

Taylor Venable committed 571f92a

Add tcv-silent-load variable to control messages

Comments (0)

Files changed (1)

 ;;; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 ;;; POSSIBILITY OF SUCH DAMAGE.
 
+(include "tcv-init#.scm")
+
 (define tcv-lib-loaded '())
-
-(define-structure tcv-lib-info
-  kind path version mtime)
+(define tcv-silent-load #f)
 
 (define tcv-lib-find
   (lambda (name)
                            (let ((current-info (tcv-lib-find name)))
                              (if (not loaded-info)
                                (begin
-                                 (println (string-append "--> File \"" (tcv-lib-info-path current-info) "\" loaded for the first time."))
+                                 (if (not tcv-silent-load)
+                                     (println (string-append "--> File \"" (tcv-lib-info-path current-info) "\" loaded for the first time.")))
                                  (set! tcv-lib-loaded (cons `(,name . ,current-info) tcv-lib-loaded))
                                  (load (tcv-lib-info-path current-info)))
                                (let ((old-path (tcv-lib-info-path (cdr loaded-info)))
                                               (eq? current-kind 'obj)
                                               (> current-version old-version)))
                                    (begin
-                                     (println (string-append "--> File \"" current-path "\" is newer on disk; reloading."))
+                                     (if (not tcv-silent-load)
+                                         (println (string-append "--> File \"" current-path "\" is newer on disk; reloading.")))
                                      (load current-path)
                                      (set-cdr! loaded-info current-info))))))))))
       (if (list? l)