2015-12-02 14:23:39 +00:00
#+TITLE : Common Lisp layer
2015-06-10 16:44:30 +00:00
[[file:img/slime.png ]]
2016-03-31 02:59:55 +00:00
* Table of Contents :TOC_4_gh:noexport:
- [[#description ][Description ]]
- [[#install ][Install ]]
- [[#key-bindings ][Key Bindings ]]
- [[#working-with-lisp-files-barfage-slurpage--more ][Working with lisp files (barfage, slurpage & more) ]]
- [[#leader ][Leader ]]
- [[#help ][Help ]]
- [[#evaluation ][Evaluation ]]
- [[#repl ][REPL ]]
- [[#compile ][Compile ]]
- [[#navigation ][Navigation ]]
- [[#macroexpansion ][Macroexpansion ]]
2015-06-10 16:44:30 +00:00
* Description
2015-07-09 19:55:14 +00:00
A Spacemacs contribution layer providing Common Lisp support via [[https://github.com/slime/slime ][SLIME ]].
2015-06-10 16:44:30 +00:00
* Install
2015-07-04 23:37:59 +00:00
If you have previously installed slime in any other way, it is recommended that
you uninstall it before proceeding. You should clean up any config files tied to
slime that are left behind as well. Linux users can just purge the slime package
if it was a distribution install.
2015-07-04 16:04:10 +00:00
2016-01-06 05:21:55 +00:00
To use this configuration layer, add it to your =~/.spacemacs= . You will need to
add =common-lisp= to the existing =dotspacemacs-configuration-layers= list in this
file.
2015-06-10 16:44:30 +00:00
2015-07-09 19:55:14 +00:00
This layer defaults to using [[http://www.sbcl.org/ ][sbcl ]]. If you want to use a different implementation
2015-06-10 16:44:30 +00:00
of Common Lisp, you can specify it in your =~/.spacemacs=
#+BEGIN_SRC emacs-lisp
2015-09-28 06:05:18 +00:00
(defun dotspacemacs/user-config ()
2015-06-10 16:44:30 +00:00
(setq inferior-lisp-program "/path/to/your/lisp"))
#+END_SRC
* Key Bindings
2015-10-08 09:53:03 +00:00
** Working with lisp files (barfage, slurpage & more)
2015-10-09 10:15:35 +00:00
Spacemacs comes with a special ~lisp-state~ for working with lisp code that
supports slurpage, barfage and more tools you'll likely want when working with
lisp.
2015-10-08 09:53:03 +00:00
2015-10-09 10:15:35 +00:00
As this state works the same for all files, the documentation is in global
[[https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org#lisp-key-bindings ][DOCUMENTATION.org ]]. In general, use ~SPC k~ to interact with the lisp-state.
2015-10-08 09:53:03 +00:00
** Leader
*** Help
2015-06-10 16:44:30 +00:00
2015-07-11 01:32:10 +00:00
| Key Binding | Description |
|-------------+---------------------------------------------------------|
| ~SPC m h a~ | SLIME apropos |
| ~SPC m h d~ | Disassemble symbol at point |
| ~SPC m h h~ | Describe symbol at point |
2017-01-13 03:33:09 +00:00
| ~SPC m h i~ | Inspect definition |
2015-07-11 01:32:10 +00:00
| ~SPC m h H~ | Hyperspec lookup symbol at point |
| ~SPC m h p~ | Browse apropos results for a package's exported symbols |
| ~SPC m h t~ | Toggle tracing of the function at point |
| ~SPC m h T~ | Untrace all functions |
| ~SPC m h <~ | Show all known callers |
| ~SPC m h >~ | Show all known callees |
| ~SPC m h m~ | Show all usages of a macro |
| ~SPC m h r~ | Show references to global variable |
| ~SPC m h s~ | Show all methods specialized on a class |
2015-06-10 16:44:30 +00:00
2015-10-08 09:53:03 +00:00
*** Evaluation
2015-06-10 16:44:30 +00:00
2015-06-22 03:46:36 +00:00
| Key Binding | Description |
|-------------+---------------------------------|
| ~SPC m e b~ | Evaluate buffer |
| ~SPC m e e~ | Evaluate last expression |
2015-07-11 01:32:10 +00:00
| ~SPC m e f~ | Evaluate top level s-expression |
| ~SPC m e F~ | Undefine the function at point |
2015-06-22 03:46:36 +00:00
| ~SPC m e r~ | Evaluate region |
2015-10-08 09:53:03 +00:00
*** REPL
2015-06-22 03:46:36 +00:00
| Key Binding | Description |
|-------------+----------------------------------|
| ~SPC m s i~ | Start an inferior process |
| ~SPC m s e~ | Evaluate last expression in REPL |
| ~SPC m s q~ | Quit |
2015-10-08 09:53:03 +00:00
*** Compile
2015-06-22 03:46:36 +00:00
| Key Binding | Description |
|-------------+--------------------------|
| ~SPC m c c~ | Compile file |
| ~SPC m c C~ | Compile file and load it |
2015-07-11 01:32:10 +00:00
| ~SPC m c l~ | Load file |
| ~SPC m c n~ | Remove compilation notes |
2015-06-22 03:46:36 +00:00
| ~SPC m c f~ | Compile function |
| ~SPC m c r~ | Compile region |
2015-10-08 09:53:03 +00:00
*** Navigation
2015-06-22 03:46:36 +00:00
| Key Binding | Description |
|---------------------------+--------------------|
2017-01-13 03:33:09 +00:00
| ~SPC m g g~ | Go to definition |
2015-07-11 01:32:10 +00:00
| ~SPC m g b~ | Go back |
2015-06-22 03:46:36 +00:00
| ~SPC m g n~ | Next note |
| ~SPC m g N~ or ~SPC m g p | Previous note |
2015-10-09 10:15:35 +00:00
2015-10-08 09:53:03 +00:00
*** Macroexpansion
2015-07-11 01:32:10 +00:00
| Key Binding | Description |
|-------------+-----------------------------------------------|
| ~SPC m m a~ | Macroexpand the expression at point completly |
| ~SPC m m o~ | Macroexpand the expression at point once |