feat(common-lisp): make quicklisp directory configurable

Previously, `+lisp/find-file-in-quicklisp` used a hard-coded directory
aimed at a nonstandard Quicklisp install location, `~/.quicklisp`. The
default install location is `~/quicklisp`, without the dot. This commit
makes the user's Quicklisp directory configurable through the variable
`+lisp-quicklisp-paths`. `+lisp/find-file-in-quicklisp` has been updated
to respect this variable.

Close: #7830
Co-authored-by: bpseudopod <bpseudopod@users.noreply.github.com>
This commit is contained in:
Henrik Lissner 2024-06-30 14:57:51 -04:00
parent 378272bcab
commit 819c20bb69
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
2 changed files with 9 additions and 1 deletions

View file

@ -37,4 +37,8 @@
(defun +lisp/find-file-in-quicklisp () (defun +lisp/find-file-in-quicklisp ()
"Find a file belonging to a library downloaded by Quicklisp." "Find a file belonging to a library downloaded by Quicklisp."
(interactive) (interactive)
(doom-project-find-file "~/.quicklisp/dists/")) (doom-project-find-file
(or (cl-loop for dir in +lisp-quicklisp-paths
if (file-directory-p dir)
return (expand-file-name "dists/" dir))
(user-error "Couldn't find your Quicklisp directory (customize `+lisp-quicklisp-paths')"))))

View file

@ -1,5 +1,9 @@
;;; lang/common-lisp/config.el -*- lexical-binding: t; -*- ;;; lang/common-lisp/config.el -*- lexical-binding: t; -*-
(defcustom +lisp-quicklisp-paths '("~/quicklisp" "~/.quicklisp")
"A list of directories to search for Quicklisp's site files."
:type '(repeat directory))
;; `lisp-mode' is loaded at startup. In order to lazy load its config we need to ;; `lisp-mode' is loaded at startup. In order to lazy load its config we need to
;; pretend it isn't loaded ;; pretend it isn't loaded
(defer-feature! lisp-mode) (defer-feature! lisp-mode)