Skip to content

Commit

Permalink
Merge pull request #33 from 40ants/autodoc-fixes
Browse files Browse the repository at this point in the history
Autodoc was fixed to not show packages without external symbols.
  • Loading branch information
svetlyak40wt committed Jul 23, 2023
2 parents 7f7a782 + d9dade4 commit d372a65
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/autodoc.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@
when (or (string-equal name system-name)
(str:starts-with? (concatenate 'string (string-downcase system-name) "/")
(string-downcase name)))
collect package))
collect package into results
finally (return (sort results
#'string<
:key #'package-name))))


(defun package-accessors-and-writers (package)
Expand Down Expand Up @@ -162,19 +165,23 @@
(add-subsection functions "Functions")
(add-subsection macros "Macros")
(add-subsection variables "Variables")))))))
`(defsection ,section-name (:title ,title
:package ,package-name)
(,(symbolicate package-name) package)
,@entries)))
(when entries
`(defsection ,section-name (:title ,title
:package ,package-name)
(,(symbolicate package-name) package)
,@entries))))


(defun make-entries (system &key (show-system-description-p nil))
(with-subsection-collector ()
(loop for package in (system-packages system)
for package-name = (package-name package)
for section-name = (symbolicate "@" (string-upcase package-name) "?PACKAGE")
collect (list section-name 'section) into entries
do (register-subsection (make-package-section section-name package))
for package-section = (make-package-section section-name package)
when package-section
collect (list section-name 'section) into entries
and
do (register-subsection package-section)
finally (return (values (registered-subsections)
(append
(when show-system-description-p
Expand Down
3 changes: 3 additions & 0 deletions src/changelog.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@
"*DOCUMENT-DOWNCASE-UPPERCASE-CODE*"
;; These objects are not documented yet:
"40ANTS-DOC/COMMONDOC/XREF:XREF"))
(0.15.0 2023-07-22
"* Autodoc was fixed to not show packages without external symbols.
* Also, now autodoc sorts packages alphabetically.")
(0.14.0 2023-06-04
"* Added 40ANTS-DOC:*SYMBOLS-WITH-IGNORED-MISSING-LOCATIONS* variable to ignore warnings on missing source location.
Expand Down

0 comments on commit d372a65

Please sign in to comment.