liberalized the XML snips so they dont require the framework

svn: r10187
This commit is contained in:
Robby Findler 2008-06-08 03:43:33 +00:00
parent 301a91e0ad
commit c9485454a9

View File

@ -23,7 +23,7 @@
"read: bad syntax: empty scheme box")
txt line col pos 1)))
(let ([stx (read-syntax
(send text get-port-name)
(get-source-name text)
(open-input-text-editor text 0 (send text last-position)))])
(when (eof-object? stx)
(raise-read-error
@ -33,6 +33,13 @@
text 1 1 1 (send text last-position)))
stx)))
(define (get-source-name text)
(cond
[(method-in-interface? 'get-port-name (object-interface text))
(send text get-port-name)]
[else
(send text get-filename)]))
(define (xml-read-special eliminate-whitespace-in-empty-tags? snip file line col pos)
(let ([editor (send snip get-editor)]
[old-locked #f])