Skip to content
Browse files

Adopt explicit qualification of exported symbols in implementation an…

…d documentation.
  • Loading branch information...
1 parent 38a2c0f commit 7929c4b044ac992a790ed693dd448363f2a55ba2 @Hexstream committed Dec 21, 2012
Showing with 10 additions and 9 deletions.
  1. +3 −3 README
  2. +1 −1 incognito-keywords.asd
  3. +6 −5 main.lisp
View
6 README
@@ -67,7 +67,7 @@ implicitly with ikeywords:defpackage, but it's also possible to create
some dynamically with ikeywords:ensure.
-macro DEFPACKAGE name &rest options => new-or-redefined-package
+macro ikeywords:DEFPACKAGE name &rest options => new-or-redefined-package
A very simplified version of cl:defpackage dedicated to creation of
"ikeyword packages". The syntax is just like cl:defpackage, except
@@ -81,7 +81,7 @@ macro DEFPACKAGE name &rest options => new-or-redefined-package
(package-used-by-list (ikeywords:package))
-function ENSURE name => new-or-existing-ikeyword
+function ikeywords:ENSURE name => new-or-existing-ikeyword
If NAME already names an ikeyword (a symbol in the IKEYWORD
package), then return that ikeyword.
@@ -96,7 +96,7 @@ function ENSURE name => new-or-existing-ikeyword
point of ikeywords!
-function PACKAGE => ikeyword-package
+function ikeywords:PACKAGE => ikeyword-package
This convenience function simply returns the IKEYWORD package.
Basically equivalent to (find-package '#:ikeyword).
View
2 incognito-keywords.asd
@@ -10,7 +10,7 @@
:depends-on (#:map-bind
#:enhanced-eval-when)
- :version "1.0.1"
+ :version "1.1"
:serial cl:t
:components ((:file "package")
(:file "main")))
View
11 main.lisp
@@ -7,22 +7,22 @@
(defvar *%cl-package* (find-package '#:cl))
(declaim (inline package))
-(defun package ()
+(defun ikeywords:package ()
*%package*)
-(defun ensure (name)
+(defun ikeywords:ensure (name)
(setf name (string name))
(when (find-symbol name *%cl-package*)
(error "Can't create an ikeyword named ~S ~
since a symbol with that name already exists ~
in the ~A package."
name (package-name *%cl-package*)))
- (let* ((ikeyword-package (package))
+ (let* ((ikeyword-package (ikeywords:package))
(symbol (intern name ikeyword-package)))
(export symbol ikeyword-package)
symbol))
-(defmacro defpackage (name &rest options)
+(defmacro ikeywords:defpackage (name &rest options)
(let* ((exported nil)
(clauses
(map-bind (mapcar) ((option options))
@@ -35,7 +35,8 @@
option))))))
`(progn
(enhanced-eval-when:eval-when t
- (mapcar #'ensure ',(reduce #'nconc (nreverse exported) :from-end t)))
+ (mapcar #'ikeywords:ensure
+ ',(reduce #'nconc (nreverse exported) :from-end t)))
(cl:defpackage ,name
(:use #:ikeyword)
,@clauses))))

0 comments on commit 7929c4b

Please sign in to comment.
Something went wrong with that request. Please try again.