Changeset 18121 in project


Ignore:
Timestamp:
05/20/10 07:16:21 (9 years ago)
Author:
syn
Message:

remove current-page-eval-env and use page-eval-env instead

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/hyde/hyde.scm

    r18114 r18121  
    3838(define translators (make-parameter '()))
    3939(define page-vars (make-parameter '()))
    40 (define current-page-eval-env (make-parameter #f))
    4140
    4241(environment-set! (page-eval-env) '$ (lambda (name)
     
    6766            (begin
    6867              (page-vars (append meta (page-vars)))
    69               (environment-set! (current-page-eval-env) 'contents contents)
     68              (environment-set! (page-eval-env) 'contents contents)
    7069              (translator))
    7170            (error (format "unknown layout format: ~A" layout)))))))
     
    10099          (lambda (meta)
    101100            (parameterize ((page-vars (append meta vars))
    102                            (current-page-eval-env env))
     101                           (page-eval-env env))
    103102              (write-to-target-file-for file (translator)))))
    104103        (call-with-returning (make-output-path file)
     
    143142(define (translate/sxml)
    144143  (output-xml
    145    (map (lambda (e) (eval e (current-page-eval-env))) (read-sexps))
     144   (map (lambda (e) (eval e (page-eval-env))) (read-sexps))
    146145   (list shortcut-rules sxml-conversion-rules)))
    147146
     
    165164  (let loop ((sexp (read)))
    166165    (unless (eof-object? sexp)
    167       (let ((scss (eval sexp (current-page-eval-env))))
     166      (let ((scss (eval sexp (page-eval-env))))
    168167        (print (match scss
    169168                 (('css  . ...) (scss->css scss))
Note: See TracChangeset for help on using the changeset viewer.