src/package.lisp, etc.: Muffle warnings about exported symbols etc.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 10 Aug 2019 00:15:03 +0000 (01:15 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 10 Aug 2019 14:46:01 +0000 (15:46 +0100)
SBCL gives big warnings if you re-evaluate a `defpackage' form and it
doesn't cover all of the exports and package uses.  I simply don't care.

src/frontend.lisp
src/optparse.lisp
src/package.lisp
src/parser/package.lisp
src/utilities.lisp

index 41f38cd..10b2a6c 100644 (file)
 ;;; along with SOD; if not, write to the Free Software Foundation,
 ;;; Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-(cl:defpackage #:sod-frontend
-  (:use #:common-lisp #:sod-utilities #:optparse #:sod #:sod-parser)
-  (:shadowing-import-from #:optparse #:int))
+(eval-when (:compile-toplevel :load-toplevel :execute)
+  (handler-bind ((warning #'muffle-warning))
+    (cl:defpackage #:sod-frontend
+      (:use #:common-lisp #:sod-utilities #:optparse #:sod #:sod-parser)
+      (:shadowing-import-from #:optparse #:int))))
 
 (cl:in-package #:sod-frontend)
 
index a34a7ea..d03b9cc 100644 (file)
 ;;; along with SOD; if not, write to the Free Software Foundation,
 ;;; Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-(cl:defpackage #:optparse
-  (:use #:common-lisp #:sod-utilities))
+(eval-when (:compile-toplevel :load-toplevel :execute)
+  (handler-bind ((warning #'muffle-warning))
+    (cl:defpackage #:optparse
+      (:use #:common-lisp #:sod-utilities))))
 
 (cl:in-package #:optparse)
 
index 13466c8..61285db 100644 (file)
 ;;; along with SOD; if not, write to the Free Software Foundation,
 ;;; Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-(cl:defpackage #:sod
-  (:use #:common-lisp
-       #:sod-utilities
-       #:sod-parser))
-
-(cl:defpackage #:sod-user
-  (:use #:common-lisp
-       #:sod-utilities
-       #:optparse
-       #:sod-parser
-       #:sod))
+(eval-when (:compile-toplevel :load-toplevel :execute)
+  (handler-bind ((warning #'muffle-warning))
+    (cl:defpackage #:sod
+      (:use #:common-lisp
+           #:sod-utilities
+           #:sod-parser))
+    (cl:defpackage #:sod-user
+      (:use #:common-lisp
+           #:sod-utilities
+           #:optparse
+           #:sod-parser
+           #:sod))))
 
 (cl:in-package #:sod)
 
index e3e363d..1ce0cfa 100644 (file)
 ;;; along with SOD; if not, write to the Free Software Foundation,
 ;;; Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-(cl:defpackage #:sod-parser
-  (:use #:common-lisp
-       #:sod-utilities
+(eval-when (:compile-toplevel :load-toplevel :execute)
+  (handler-bind ((warning #'muffle-warning))
+    (cl:defpackage #:sod-parser
+      (:use #:common-lisp
+           #:sod-utilities
 
-       ;; Try to find Gray streams support from somewhere.  ECL tucks them
-       ;; somewhere unhelpful.
-       #.(or (car '(#+sbcl #:sb-gray
-                    #+cmu #:extensions
-                    #+ecl #.(if (find-package '#:gray) '#:gray '#:si)
-                    #+clisp #:gray))
-             (error "Unsupported Lisp (can't find Gray streams)")))
+           ;; Try to find Gray streams support from somewhere.  ECL tucks
+           ;; them somewhere unhelpful.
+           #.(or (car '(#+sbcl #:sb-gray
+                        #+cmu #:extensions
+                        #+ecl #.(if (find-package '#:gray) '#:gray '#:si)
+                        #+clisp #:gray))
+                 (error "Unsupported Lisp (can't find Gray streams)")))
 
-  ;; CMUCL's `extensions' package has lots of cruft.  Use our cruft instead.
-  #+cmu (:shadowing-import-from #:sod-utilities #:symbolicate #:once-only))
+      ;; CMUCL's `extensions' package has lots of cruft.  Use our cruft
+      ;; instead.
+      #+cmu (:shadowing-import-from
+            #:sod-utilities #:symbolicate #:once-only))))
 
 ;;;----- That's all, folks --------------------------------------------------
index e7e1ae2..a496283 100644 (file)
 ;;; along with SOD; if not, write to the Free Software Foundation,
 ;;; Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-(cl:defpackage #:sod-utilities
-  (:use #:common-lisp
-
-       ;; MOP from somewhere.
-       #+sbcl #:sb-mop
-       #+(or cmu clisp) #:mop
-       #+ecl #:clos))
+(eval-when (:compile-toplevel :load-toplevel :execute)
+  (handler-bind ((warning #'muffle-warning))
+    (cl:defpackage #:sod-utilities
+      (:use #:common-lisp
+
+           ;; MOP from somewhere.
+           #+sbcl #:sb-mop
+           #+(or cmu clisp) #:mop
+           #+ecl #:clos))))
 
 (cl:in-package #:sod-utilities)