gen-completions.lisp 1.0 KB

1234567891011121314151617181920212223242526
  1. (defvar symbols nil)
  2. (do-all-symbols (sym)
  3. (let ((package (symbol-package sym)))
  4. (cond
  5. ((not (fboundp sym)))
  6. ((or (eql #.(find-package :cl) package)
  7. (eql #.(find-package :extensions) package)
  8. (eql #.(find-package :cl-user) package))
  9. (pushnew (symbol-name sym) symbols))
  10. ((eql #.(find-package :keyword) package)
  11. (pushnew (concatenate 'string ":" (symbol-name sym)) symbols))
  12. (package
  13. (pushnew (concatenate 'string
  14. (package-name package)
  15. ":"
  16. (symbol-name sym))
  17. symbols)))))
  18. (with-open-file (output #.(concatenate 'string
  19. (getenv "PWD")
  20. "/files/abcl_completions")
  21. :direction :output :if-exists :overwrite
  22. :if-does-not-exist :create)
  23. (format output "~{~(~A~)~%~}" (sort symbols #'string<)))
  24. (quit)