Windows,Ubuntu両環境のSpacemacs + SLIMEでCommon Lispを編集できるようにする


Windows NTEmacs64の場合



  • C:\Users\USERNAME\AppData\Roaming.spacemacsの
    • dotspacemacs-configuration-layers  に common-lisp を追加する
    • dotspacemacs-install-packages ‘used-but-keep-unused にする*1
    • (defun dotspacemacs/user-config ()  に (setq inferior-lisp-program “sbcl.exe”)  を追加する*2

     ;; ----------------------------------------------------------------
     ;; Example of useful layers you may want to use right away.
     ;; Uncomment some layer names and press <SPC f e R> (Vim style) or
     ;; <M-m f e R> (Emacs style) to install them.
     ;; ----------------------------------------------------------------
     ;; auto-completion
     ;; better-defaults
     ;; git
     ;; markdown
     ;; org
     ;; (shell :variables
     ;;        shell-default-height 30
     ;;        shell-default-position 'bottom)
     ;; spell-checking
     ;; syntax-checking
     ;; version-control
   ;; List of additional packages that will be installed without being
   ;; wrapped in a layer. If you need some configuration for these
   ;; packages, then consider creating a layer. You can also put the
   ;; configuration in `dotspacemacs/user-config'.
   dotspacemacs-additional-packages '()
   ;; A list of packages that cannot be updated.
   dotspacemacs-frozen-packages '()
   ;; A list of packages that will not be installed and loaded.
   dotspacemacs-excluded-packages '()
   ;; Defines the behaviour of Spacemacs when installing packages.
   ;; Possible values are `used-only', `used-but-keep-unused' and `all'.
   ;; `used-only' installs only explicitly used packages and uninstall any
   ;; unused packages as well as their unused dependencies.
   ;; `used-but-keep-unused' installs only the used packages but won't uninstall
   ;; them if they become unused. `all' installs *all* packages supported by
   ;; Spacemacs and never uninstall them. (default is `used-only')
   dotspacemacs-install-packages 'used-but-keep-unused))

(defun dotspacemacs/user-config ()
  "Configuration function for user code.
This function is called at the very end of Spacemacs initialization after
layers configuration.
This is the place where most of your configurations should be done. Unless it is
explicitly specified that a variable should be set before a package is loaded,
you should place your code here."
(setq inferior-lisp-program "sbcl.exe")



SPC SPC slime で起動する。


  • aptでインストールできるsbclは古いので、(に従ってインストールする。*3
  • spacemacsのインストール方法は git clone ~/.emacs.d そのままで良い
  • ~/.spacemacsをWindowsと同様に編集。ただし、(setq inferior-lisp-program "sbcl.exe") -> (setq inferior-lisp-program "sbcl") にする