This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hi,
I found no match on "oleg" when searching the kawa mailing lists...
Since I gave up on trying to use as-xml/print-as-xml etc., I turned towards Oleg's SXML code. http://pobox.com/~oleg/ftp/
Here's a preliminary port of his prelude to Kawa:
Things to be done:
o turn the initial (defmacro define-macro into define-syntax
Then, define-macro can be used in the same file: a single file is left:
o Provide with-input-from-string, with-output-to-string etc.
I.e. Find out how to redirect current-output-port in Kawa.
Oleg's SXML->HTML writes to current-output-port. Oleg, I have a small suggestion: I don't like such functions - I very much prefer to provide the output port. From my experience with Common Lisp's *standard-output*, locally rebinding it and feature interaction in large packages, it's a bad idea not to accept an output stream as argument: please leave the current output port alone.
So here's myenv.scm for Kawa: (I used myenv.scm and myenv-kawa.scm for the above macro usage problem), also included as attachment:
; My Standard Scheme "Prelude"
; Version for kawa-1.68
; $Id$
; Very Kawa-specific definitions
(defmacro define-macro (bindings . body)
(if (pair? bindings)
; form (define-macro (foo x) body)
`(defmacro ,(car bindings) ,(cdr bindings) ,@body)
; form (define-macro foo (lambda (x) body))
(let ((rest (gentemp)))
`(defmacro ,bindings ,rest (apply ,@body ,rest)))))
; currently Kawa documentation states cannot use macro defined by
; defmacro in same file. Oleg's code does this all the time...
;(display "Must also (load \"myenv-kawa.scm\")")
(load "myenv-kawa.scm")
Regards,
Jörg Höhle.
Hmm, I thought I had read Oleg's last name somewhere in a file...
Attachment:
myenv.scm
Description: Binary data
Attachment:
myenv-kawa.scm
Description: Binary data
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |