Commit 8a80cbc5 authored by Robert Goldman's avatar Robert Goldman
Browse files

Merge branch 'define-package' into 'master'

Define package fixes

See merge request asdf/asdf!92
parents 2a5bc3be 21e3a85b
......@@ -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,9 +733,9 @@ 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))
#+(or clasp ecl gcl mkcl) (defpackage ,package (:use))
(eval-when (:compile-toplevel :load-toplevel :execute)
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