简体   繁体   中英

Loading SLIME editing commands in Emacs in LispBox

I'm using LispBox on OS X. I was trying to use the SLIME command Cc C-] to close all open parentheses in a given S-expression. But the emacs status tells me that Cc C-] is undefined . When I manually type it in using "Mx slime-close-all-parens-in-sexp", it works. The commands for this are documented here: Slime docs

I searched and found that SLIME doesn't load contrib modules by default, and that I need to add some config to my ~/.emacs file. The config needed is

(setq inferior-lisp-program "/opt/sbcl/bin/sbcl") ; your Lisp system
 (add-to-list 'load-path "~/hacking/lisp/slime/")  ; your SLIME directory
 (require 'slime-autoloads)
 (slime-setup '(slime-scratch slime-editing-commands))

as mentioned here: Loading contribs.

I din't have an .emacs file at all on my system. So I created one and added the above, changing the relevant lines. When I start it up, nothings changed. Leading me to believe that this .emacs file is not being used for configuring the emacs session in the LispBox app.

I did a search on the LispBox directory and found that there is a lispbox.el file deep inside the emacs.app folder that has the line:

(slime-setup '(slime-fancy slime-asdf slime-banner))

Thinking that this is where slime is being setup for use in LispBox, I changed it to:

(slime-setup '(slime-fancy slime-asdf slime-banner slime-editing-commands))

I restarted LispBox and still no change!

  • What can I do to get the slime-editing-commands loaded?
  • Is there a way to find out if emacs is using a particular configuration file?

Lispbox doesn't access .emacs init files. You can resolve this by editing the .sh file in the app bundle and removing the "no init" line that it passes to the emacs startup.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM