use-package slime

(untested)
This commit is contained in:
larstvei 2023-06-13 02:36:18 +02:00
parent 750e0dc93a
commit 22ad834c41

View File

@ -207,8 +207,7 @@
(let* ((package--builtins nil)
(packages
'(slime ; Superior Lisp Interaction Mode for Emacs
try ; Try out Emacs packages
'(try ; Try out Emacs packages
vterm ; A terminal via libvterm
which-key ; Display available keybindings in popup
z3-mode))) ; z3/SMTLIBv2 interactive development
@ -1472,40 +1471,35 @@
*** Common lisp
#+begin_quote
Note that I haven't used Common Lisp for a very long time, and this setup
might be broken. I keep it around for reference.
#+end_quote
I use [[http://www.common-lisp.net/project/slime/][Slime]] along with =lisp-mode= to edit Common Lisp code. Slime provides
code evaluation and other great features, a must have for a Common Lisp
developer. [[http://www.quicklisp.org/beta/][Quicklisp]] is a library manager for Common Lisp, and you can
install Slime following the instructions from the site along with this
snippet.
developer. You can install the Common Lisp slime counterpart using
[[http://www.quicklisp.org/beta/][Quicklisp]], creating a helper that can be loaded.
We can specify what Common Lisp program Slime should use (I use SBCL). More
sensible =loop= indentation is borrowed from [[https://github.com/simenheg][simenheg]].
#+begin_src emacs-lisp
(defun activate-slime-helper ()
;; Superior Lisp Interaction Mode for Emacs
(use-package slime
:defer t
:bind (:map slime-repl-mode-map ("C-l" . slime-repl-clear-buffer))
:hook (common-lisp-mode . activate-slime-helper)
:config
(when (file-exists-p "~/.quicklisp/slime-helper.el")
(load (expand-file-name "~/.quicklisp/slime-helper.el"))
(define-key slime-repl-mode-map (kbd "C-l")
'slime-repl-clear-buffer))
(remove-hook 'common-lisp-mode-hook #'activate-slime-helper))
(load (expand-file-name "~/.quicklisp/slime-helper.el")))
(add-hook 'common-lisp-mode-hook #'activate-slime-helper)
(setq inferior-lisp-program "sbcl")
#+end_src
We can specify what Common Lisp program Slime should use (I use SBCL).
#+begin_src emacs-lisp
(setq inferior-lisp-program "sbcl")
#+end_src
More sensible =loop= indentation, borrowed from [[https://github.com/simenheg][simenheg]].
#+begin_src emacs-lisp
(setq lisp-loop-forms-indentation 6
lisp-simple-loop-indentation 2
lisp-loop-keyword-indentation 6)
(setq lisp-loop-forms-indentation 6
lisp-simple-loop-indentation 2
lisp-loop-keyword-indentation 6))
#+end_src