Skip to content
Browse files

New exported function: IKEYWORDP.

  • Loading branch information...
1 parent 6188cf3 commit a163c1c2110040829889610927b8f4509eaeb88b @Hexstream committed Dec 21, 2012
Showing with 13 additions and 2 deletions.
  1. +6 −0 README
  2. +4 −0 main.lisp
  3. +3 −2 package.lisp
View
6 README
@@ -102,6 +102,12 @@ function ikeywords:PACKAGE => ikeyword-package
Basically equivalent to (find-package '#:ikeyword).
+function ikeywords:IKEYWORDP object => generalized-boolean
+
+ This convenience function simply returns true if the OBJECT is a
+ symbol and its home package (as returned by SYMBOL-PACKAGE) is the
+ IKEYWORD package, else it returns false.
+
Restrictions to avoid definition conflicts
------------------------------------------
View
4 main.lisp
@@ -10,6 +10,10 @@
(defun ikeywords:package ()
*%package*)
+(defun ikeywords:ikeywordp (object)
+ (and (symbolp object)
+ (eq (symbol-package object) (ikeywords:package))))
+
(defun ikeywords:ensure (name)
(setf name (string name))
(when (find-symbol name *%cl-package*)
View
5 package.lisp
@@ -4,6 +4,7 @@
(:import-from #:map-bind #:map-bind)
(:shadow #:package
#:defpackage)
- (:export #:package
+ (:export #:defpackage
#:ensure
- #:defpackage))
+ #:package
+ #:ikeywordp))

0 comments on commit a163c1c

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