Plaster
New
List
Login
common-lisp
default
anonymous
2019.04.29 18:03:18
(defun systems-in-directory (dir) (loop :for p :in (directory (merge-pathnames "**/*.asd" dir)) :append (with-open-file (str p :direction :input) (let (form (*read-eval* nil)) (loop :with sys :while (setf form (ignore-errors (read str nil))) :when (equal (car form) 'defsystem) :do (setf sys (second form)) :and :collect (or (and (keywordp sys) sys) (intern (string-upcase sys) :keyword)))))))
Raw
Annotate
Repaste
Edit