(def-frob package-used-by-list package-%used-by-list)
(def-frob package-shadowing-symbols package-%shadowing-symbols))
-(flet ((stuff (table)
- (let ((size (the fixnum
- (- (the fixnum (package-hashtable-size table))
- (the fixnum
- (package-hashtable-deleted table))))))
- (declare (fixnum size))
- (values (the fixnum
- (- size
- (the fixnum
- (package-hashtable-free table))))
- size))))
- (defun package-internal-symbol-count (package)
- (stuff (package-internal-symbols package)))
- (defun package-external-symbol-count (package)
- (stuff (package-external-symbols package))))
+(defun %package-hashtable-symbol-count (table)
+ (let ((size (the fixnum
+ (- (the fixnum (package-hashtable-size table))
+ (the fixnum
+ (package-hashtable-deleted table))))))
+ (declare (fixnum size))
+ (the fixnum
+ (- size
+ (the fixnum
+ (package-hashtable-free table))))))
+
+(defun package-internal-symbol-count (package)
+ (%package-hashtable-symbol-count (package-internal-symbols package)))
+
+(defun package-external-symbol-count (package)
+ (%package-hashtable-symbol-count (package-external-symbols package)))
\f
(defvar *package* (error "*PACKAGE* should be initialized in cold load!")
#!+sb-doc "the current package")
(defun list-all-packages ()
#!+sb-doc
- "Returns a list of all existing packages."
+ "Return a list of all existing packages."
(let ((res ()))
(maphash #'(lambda (k v)
(declare (ignore k))
\f
(defun intern (name &optional (package (sane-package)))
#!+sb-doc
- "Returns a symbol having the specified name, creating it if necessary."
+ "Return a symbol having the specified name, creating it if necessary."
;; We just simple-stringify the name and call INTERN*, where the real
;; logic is.
(let ((name (if (simple-string-p name)
(defun find-symbol (name &optional (package (sane-package)))
#!+sb-doc
- "Returns the symbol named String in Package. If such a symbol is found
+ "Return the symbol named String in Package. If such a symbol is found
then the second value is :internal, :external or :inherited to indicate
how the symbol is accessible. If no symbol is found then both values
are NIL."
\f
;;;; APROPOS and APROPOS-LIST
-;;; KLUDGE: All the APROPOS stuff should probably be byte-compiled, since it's
-;;; only likely to be used interactively. -- WHN 19990827
-
(defun briefly-describe-symbol (symbol)
(fresh-line)
(prin1 symbol)