Created
June 14, 2017 04:16
-
-
Save hyotang666/bc0d97ce5477c5e360853621f4fc7ed5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun make-package-name(pathname) | |
(values ; to discard second value. | |
(read-from-string ; to use implementation dependent readtable case. | |
(namestring(make-pathname :type nil :defaults pathname))))) | |
(defun load-as-package(pathname) | |
(let((package-name(make-package-name(enough-namestring pathname (uiop:getcwd))))) | |
(let((*package*(or (find-package package-name) | |
(make-package package-name :use '(:cl))))) | |
(uiop:load* pathname)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment