Changeset 20418 in project


Ignore:
Timestamp:
09/20/10 11:11:29 (8 years ago)
Author:
felix
Message:

verbose -> quiet; csi toplevel commands

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/system/trunk/system.scm

    r20411 r20418  
    66(use coops)
    77(use srfi-1 utils posix extras files)
    8 
    9 
    10 (define-constant default-verbosity #t)
     8(import csi)
    119
    1210
     
    112110(define verbose-action (make-parameter #f))
    113111
    114 (define (load-system sys #!key (verbose default-verbosity) force)
    115   (parameterize ((verbose-action verbose)
     112(define (load-system sys #!key quiet force)
     113  (parameterize ((verbose-action (not quiet))
    116114                 (current-system sys))
    117115    (when force (clean-system sys))
     
    121119          #f))))
    122120
    123 (define (compile-system sys #!key (verbose default-verbosity) force)
    124   (parameterize ((verbose-action verbose)
     121(define (compile-system sys #!key quiet force)
     122  (parameterize ((verbose-action (not quiet))
    125123                 (current-system sys))
    126124    (when force (clean-system sys))
     
    209207    (set! (file-last-load-time sf) (current-seconds))
    210208    (set! (file-compiled-file sf) cf)))
     209
     210
     211;;; csi toplevel commands
     212
     213(when (feature? #:csi)
     214  (let ((selected #f))
     215    (define (check)
     216      (or selected
     217          (error "no system selected - please use the `,sys' command to select one")))
     218    (toplevel-command
     219     'ls
     220     (lambda () (load-system (check)))
     221     ",ls            load selected system")
     222    (toplevel-command
     223     'cs
     224     (lambda () (load-system (check)))
     225     ",cs            compile selected system")
     226    (toplevel-command
     227     'sys
     228     (lambda () (load-system (check)))
     229     ",sys SYSTEM    select system")))
     230
Note: See TracChangeset for help on using the changeset viewer.