]> git.earman.xyz Git - emacsinit.git/commitdiff
Make SLIME's loading conditional
authorrearman <rearman@r717.net>
Wed, 5 Jun 2024 13:09:32 +0000 (09:09 -0400)
committerrearman <rearman@r717.net>
Wed, 5 Jun 2024 13:09:32 +0000 (09:09 -0400)
init.org

index 7af00416aeb65648ec36678c02195b9c7fc5a247..96094f26c45ae5861b91b0dfce0faca9c2ed5d3a 100644 (file)
--- a/init.org
+++ b/init.org
@@ -254,22 +254,24 @@ Starting to do some work with LaTeX, surprised this is not in base, but org is.
 #+END_SRC
 
 *** SLIME
-Lisp me
-#+BEGIN_SRC emacs-lisp
-(load (expand-file-name "~/quicklisp/slime-helper.el"))
-(setq inferior-lisp-program "sbcl")
-
-(use-package slime
-  :ensure t
-  :custom
-  (slime-net-coding-system 'utf-8-unix)
-  (slime-lisp-implementations
-   '((sbcl ("sbcl" "--core" "sbcl.core-for-slime") :directory "~/lisp"))))
-
-(add-hook 'slime-mode-hook
-          (lambda ()
-            (unless (slime-connected-p)
-              (save-excursion (slime)))))
+Lisp me...sometimes.
+#+BEGIN_SRC emacs-lisp
+(let ((slime-help "~/quicklisp/slime-helper.el"))
+  (when (file-exists-p slime-help)
+    (load (expand-file-name slime-help))
+    (setq inferior-lisp-program "sbcl")
+    (use-package slime
+      :ensure t
+      :custom
+      (slime-net-coding-system 'utf-8-unix))
+    (when (file-exists-p "~/lisp/sbcl.core-for-slime")
+      (setq slime-lisp-implementations
+            '((sbcl ("sbcl" "--core" "sbcl.core-for-slime")
+                    :directory "~/lisp"))))
+    (add-hook 'slime-mode-hook
+              (lambda ()
+                (unless (slime-connected-p)
+                  (save-excursion (slime)))))))
 #+END_SRC
 
 ** Non-Package customization