diff --git a/src/lsp/export.lsp b/src/lsp/export.lsp index 283e6eca5..a6b1a5dd8 100644 --- a/src/lsp/export.lsp +++ b/src/lsp/export.lsp @@ -278,6 +278,7 @@ with-open-file with-open-stream with-output-to-string + with-standard-io-syntax write-to-string y-or-n-p yes-or-no-p diff --git a/src/lsp/iolib.lsp b/src/lsp/iolib.lsp index 70f616622..15aa39e37 100644 --- a/src/lsp/iolib.lsp +++ b/src/lsp/iolib.lsp @@ -178,3 +178,26 @@ namestring year month day hour min sec)))))) ;(provide 'iolib) + +(defmacro with-standard-io-syntax (&body body) + `(let ((*package* (find-package :cl-user)) + (*print-array* t) + (*print-base* 10) + (*print-case* :upcase) + (*print-circle* nil) + (*print-escape* t) + (*print-gensym* t) + (*print-length* nil) + (*print-level* nil) + (*print-lines* nil) + (*print-miser-width* nil) + (*print-pretty* nil) + (*print-radix* nil) + (*print-radably* t) + (*print-right-margin* nil) + (*read-base* 10) + (*read-default-float-format* 'single-float) + (*read-eval* t) + (*read-suppress* nil) + (*readtable* (copy-readtable (si::standard-readtable)))) + ,@body)) \ No newline at end of file