about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-04-09 17:51:29 -0500
committerCase Duckworth2021-04-09 17:51:29 -0500
commit5f45147ca556bd9c97d09ec37a39f429ae9dc3d6 (patch)
tree3493ba1626cda6bbbb4ae46b7195ca490173c672
parentWhitespace (diff)
downloademacs-5f45147ca556bd9c97d09ec37a39f429ae9dc3d6.tar.gz
emacs-5f45147ca556bd9c97d09ec37a39f429ae9dc3d6.zip
Load slime-helper.el if it exists
I couldn't find a function that would return a filename /if/ it exists, so I
had to write one: `expand-file-name-exists-p'.  Might change the name at some
point.
-rw-r--r--init.el8
-rw-r--r--lisp/acdw.el8
2 files changed, 15 insertions, 1 deletions
diff --git a/init.el b/init.el index d70aeb0..b93f4aa 100644 --- a/init.el +++ b/init.el
@@ -759,7 +759,13 @@ if ripgrep is installed, otherwise `consult-grep'."
759 (executable-find "sbcl"))) 759 (executable-find "sbcl")))
760 (setup (:straight slime) 760 (setup (:straight slime)
761 (require 'slime-autoloads) 761 (require 'slime-autoloads)
762 (:option inferior-lisp-program lisp-bin))) 762 (:option inferior-lisp-program lisp-bin)
763
764 (when-let ((slime-helper (or (expand-file-name-exists-p
765 "~/quicklisp/slime-helper.el")
766 (expand-file-name-exists-p
767 "~/var/quicklisp/slime-helper.el"))))
768 (load slime-helper))))
763 769
764(when (executable-find "fennel") 770(when (executable-find "fennel")
765 (setup (:straight fennel-mode) 771 (setup (:straight fennel-mode)
diff --git a/lisp/acdw.el b/lisp/acdw.el index fd33514..44d15d0 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -62,6 +62,14 @@ each hook in HOOKS."
62 (when (file-exists-p file) 62 (when (file-exists-p file)
63 (load-file file)))) 63 (load-file file))))
64 64
65(defun expand-file-name-exists-p (&rest expand-file-name-args)
66 "Call `expand-file-name' on EXPAND-FILE-NAME-ARGS, returning
67 its name if it exists, or NIL otherwise."
68 (let ((file (apply #'expand-file-name expand-file-name-args)))
69 (if (file-exists-p file)
70 file
71 nil)))
72
65(defun acdw/dir (&optional file make-directory) 73(defun acdw/dir (&optional file make-directory)
66 "Place Emacs files in one place. 74 "Place Emacs files in one place.
67 75