Skip to content

Commit

Permalink
more tweaks to janky-parse-package
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaggers committed Apr 4, 2018
1 parent 0cd6683 commit 345fed9
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/vari.cl/docs.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
(symbol (find-package (symbol-name symbol/string)))
(string (or (find-package symbol/string)
(find-package (string-upcase symbol/string))
(let ((pos (position #\: symbol/string :test #'char=)))
(when (eql pos 0)
(let ((name (subseq symbol/string 1)))
(find-package name)
(find-package (string-upcase name)))))))))
(let* ((name (string symbol/string))
(pos (position #\: name :test #'char=)))
(when (or (eql pos 0)
(eql pos 1))
(let ((name (subseq name (1+ pos))))
(or (find-package name)
(find-package (string-upcase name))))))))))

(defun janky-parse-name (str try-package)
(flet ((inner (str package)
Expand Down

0 comments on commit 345fed9

Please sign in to comment.