Make write-xml port argument optional.
authorChris Hanson <org/chris-hanson/cph>
Sun, 7 May 2017 22:32:28 +0000 (15:32 -0700)
committerChris Hanson <org/chris-hanson/cph>
Sun, 7 May 2017 22:32:28 +0000 (15:32 -0700)
src/xml/xml-output.scm

index 54f306c4428cd07476c7a7e7750abb7bbbdf7a49..5075a705fea7e70def86e201909dc376753090d6 100644 (file)
@@ -28,8 +28,12 @@ USA.
 
 (declare (usual-integrations))
 \f
-(define (write-xml xml port . options)
-  (write-xml* xml port options))
+(define (write-xml xml #!optional port . options)
+  (write-xml* xml
+             (if (default-object? port)
+                 (current-output-port)
+                 port)
+             options))
 
 (define (write-xml-file xml pathname . options)
   (call-with-output-file pathname