Op zaterdag 26-06-2010 om 00:06 uur [tijdzone +0000], schreef
[email protected]:
> Let me know what you think.
It's getting there...
This is not exactly what I had in mind
+ (if (or (eq? (caar commands) 'moveto)
+ (eq? (caar commands) 'rmoveto))
+ (let ((command (car commands)))
+ (begin
I was thinking to let GUILE do that work using eval,
look at this below
scm/ps-path.scm:
;; ps-path module: postscript PATH routines
;; move/add these to scm/output-ps.scm?
(define-module (scm ps-path)
:export (moveto))
(define-public (moveto x y)
(format #t "~a ~a moveto (postscript)\n" x y))
;; end ps-path.scm
and eval-path.scm:
#! /usr/bin/guile -s
!#
(define (main args)
(display "main\n")
(format #t "scm ps-path: ~A\n" (resolve-module '(scm ps-path)))
(format #t "scm-ps-path moveto: ~A\n" (module-ref (resolve-module '(scm
ps-path)) 'moveto))
(eval '(moveto 1 2) (resolve-module '(scm ps-path)))
(map (lambda (x) (eval-string x (resolve-module '(scm ps-path))))
(cdr args)))
(main (command-line))
;; end eval-path.scm
16:44:45 jann...@peder:~/vc/lilypond
$ GUILE_LOAD_PATH=. ./eval-ps-path.scm
main
scm ps-path: #<directory (scm ps-path) 7f7cccaf3fa0>
scm-ps-path moveto: #<procedure moveto (x y)>
1 2 moveto (postscript)
16:44:54 jann...@peder:~/vc/lilypond
Jan.
--
Jan Nieuwenhuizen <[email protected]> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyOfSource.com | AvatarĀ® http://AvatarAcademy.nl
_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel