more-docstrings: fix when symbol has no docstring (loop)

This commit is contained in:
vindarel 2022-09-27 14:44:07 +02:00
parent c5b71818e3
commit b10d405a20
3 changed files with 5 additions and 7 deletions

View file

@ -122,7 +122,7 @@
:description "CIEL Is an Extended Lisp.")
(asdf:defsystem "ciel/repl"
:depends-on (;; :ciel ;; don't, it will re-load its components files and re-apply their side effects (docstrings.lisp).
:depends-on (;; :ciel ;; let's avoid, it could run side effects twice (like a defparameter set then reset).
;; deps
:cl-readline
:cffi ;; "tmp", for cl-readline add history

View file

@ -35,9 +35,6 @@ https://lispcookbook.github.io/cl-cookbook/iteration.html
and that's it. To be continued.
A couple gotchas though:
A gotcha though:
- if we quickload the package twice, the docstrings
are appended twice too :S The hash-table cache doesn't help in that
case.
- we are modifying the symbols in the :cl package.
- we are modifying the symbols in the :cl package, there is currently no way to "undo" these additions.

View file

@ -37,7 +37,8 @@ case.
(let ((doc (documentation symbol doc-type)))
(setf (gethash symbol *docstrings-cache*)
doc)
;; don't store a NIL docstring.
(or doc ""))
doc))))
(defun docstring-append (symbol s &optional (doc-type 'function))