Last active
December 18, 2015 08:29
-
-
Save bhyde/5754124 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
(in-package #:cl-user) | |
(defun display-doc-of-package-exports (package) | |
"Simple code to display the documenation for a package's exports." | |
(flet ((arglist (sym) | |
#+ccl (ccl:arglist sym) | |
#-ccl ())) | |
(let ((*package* (find-package package))) | |
(do-external-symbols (s *package*) | |
(loop | |
for doc-type in '(function variable | |
compiler-macro setf method-combination | |
type structure) | |
as doc = (documentation s doc-type) | |
when doc do | |
(format t "~2&== ~@(~A~): ~A~@[ ~A~]~&~A" | |
(if (eq 'function doc-type) | |
(cond | |
((macro-function s) 'macro) | |
((special-operator-p s) 'special) | |
(t doc-type)) | |
doc-type) | |
s | |
(case doc-type | |
((method-combination function compiler-macro) | |
(arglist s))) | |
doc)))))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment