From: Mark Wooding Date: Thu, 26 May 2016 08:26:09 +0000 (+0100) Subject: src/module-parse.lisp, src/package.lisp: Read code in `sod-user' package. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/commitdiff_plain/65e5cd247055593b225dbedfadd4e84ee1d63daa src/module-parse.lisp, src/package.lisp: Read code in `sod-user' package. Define a `sod-user' package which uses `common-lisp' and `sod', and bind `*package*' to this when we start reading a new module. --- diff --git a/src/module-parse.lisp b/src/module-parse.lisp index 15a7d8f..83cc0ad 100644 --- a/src/module-parse.lisp +++ b/src/module-parse.lisp @@ -101,6 +101,7 @@ (defun read-module (pathname &key (truename nil truep) location) (define-module (pathname :location location :truename truename) (with-open-file (f-stream pathname :direction :input) (let* ((*readtable* (copy-readtable)) + (*package* (find-package '#:sod-user)) (char-scanner (make-instance 'charbuf-scanner :stream f-stream)) (scanner (make-instance 'sod-token-scanner diff --git a/src/package.lisp b/src/package.lisp index 1e7b54b..292b64f 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -28,6 +28,10 @@ (cl:defpackage #:sod #:sod-utilities #:sod-parser)) +(cl:defpackage #:sod-user + (:use #:common-lisp + #:sod)) + (cl:in-package #:sod) ;;;----- That's all, folks --------------------------------------------------