Commit 21e3a85b authored by Eric Timmons's avatar Eric Timmons Committed by Francois-Rene Rideau
Browse files

Change apply to funcall in expansion of define-package

SBCL has been getting aggresive with checking arguments to functions. For some
reason (as of SBCL 1.4.1), setting the package source location in define-package
seems to trigger a source translation for the apply form that ends up producing
(many) compilation notes that the arguments to ensure-package in the keyword
positions are not constant, weakening keyword argument checking. We can get
around that, however, by using a funcall directly.
parent ed0f4d5e
......@@ -700,13 +700,13 @@ or when loading the package is optional."
:and :do (setf use-p t) :else
:when (eq kw :unintern) :append args :into unintern :else
:do (error "unrecognized define-package keyword ~S" kw)
:finally (return `(,package
:nicknames ,nicknames :documentation ,documentation
:use ,(if use-p use '(:common-lisp))
:shadow ,shadow :shadowing-import-from ,shadowing-import-from
:import-from ,import-from :export ,export :intern ,intern
:recycle ,(if recycle-p recycle (cons package nicknames))
:mix ,mix :reexport ,reexport :unintern ,unintern)))))
:finally (return `(',package
:nicknames ',nicknames :documentation ',documentation
:use ',(if use-p use '(:common-lisp))
:shadow ',shadow :shadowing-import-from ',shadowing-import-from
:import-from ',import-from :export ',export :intern ',intern
:recycle ',(if recycle-p recycle (cons package nicknames))
:mix ',mix :reexport ',reexport :unintern ',unintern)))))
(defmacro define-package (package &rest clauses)
"DEFINE-PACKAGE takes a PACKAGE and a number of CLAUSES, of the form
......@@ -733,7 +733,7 @@ of shadowing, etc. the symbols with the same name may not be the same symbols.
UNINTERN -- Remove symbols here from PACKAGE."
(let ((ensure-form
(apply 'ensure-package ',(parse-define-package-form package clauses))
(funcall 'ensure-package ,@(parse-define-package-form package clauses))
#+sbcl (setf (sb-impl::package-source-location (find-package ',package))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment