如何搭建 SLIME 环境
sbcl
brew install sbcl
Emacs
brew install emacs
Quicklisp
Quicklisp is a library manager for Common Lisp. It works with your existing Common Lisp implementation to download, install, and load any of over 1,500 libraries with a few simple commands.Quicklisp is easy to install and works with ABCL, Allegro CL, Clasp, Clozure CL, CLISP, CMUCL, ECL, LispWorks, MKCL, SBCL, and Scieneer CL, on Linux, Mac OS X, and Windows.
Slime
curl -O https://beta.quicklisp.org/quicklisp.lisp sbcl --load quicklisp.lisp (quicklisp-quickstart:install) (ql:add-to-init-file) (ql:quickload "quicklisp-slime-helper") (quit)
如上用 quicklisp 包管理工具安装 slime 完成后会输出配置 .emacs 代码
(load (expand-file-name "~/quicklisp/slime-helper.el")) ;; Replace "sbcl" with the path to your implementation (setq inferior-lisp-program "sbcl")
start
M-x slime
table notes
命令 | 属性 |
---|---|
C-c C-k | Complie and load the current buffer's file |
C-c C-c | Complie the top-level form at point |
M-n | slime-next-note |
M-p | slime-previous-note |
C-c C-] | slime-close-all-parens-in-sexp |
C-c Tab | slime-complete-symbol |
C-c C-t | slime-toggle-fancy-trace |
C-c C-w C-c | slime-who-calls |
C-c Return | macroexpand interactively |
C-c M-d | Disassemble a funtion |
C-c I | slime-inspect |
C-h m | Holy grail :) |
Comments:
Email questions, comments, and corrections to hi@smartisan.dev.
Submissions may appear publicly on this website, unless requested otherwise in your email.