I am unable to close the last brace and send my function to the REPL using lisp -mode in Slime
This is a very simple question. I installed Emacs 22.2.1 (from the Ubuntu (9.04) repository and I downloaded Slime-current from the repo on my home page.
I followed the slime instructions and it works. I can run the slime and use it as expected.
However, when I enter lisp -mode (Mx lisp -mode), I can no longer interact with the REPL. I don't type anything, the cursor just moves to the next line when I press enter.
Who has a fix for this?
Edit:
For a question about how I use Emacs. Yes, I start Emacs and then step into slime with Mx slime. I read that I can get the correct syntax highlighting by following the lisp mode input with Mx lisp -mode.
It provided syntax highlighting, but as stated below, this was for editing text files, not interacting with the REPL.
I also recently read that putting the following in my .emacs file will allow syntax highlighting (it didn't work).
; Syntax Highlighting
(global-font-lock-mode 1)
; Enable slime
(add-to-list 'load-path "/home/doug/Software/slime/") ; your SLIME directory
(setq inferior-lisp-program "/home/doug/Software/ccl/ccl") ; your Lisp system
(require 'slime)
(slime-setup)
; Enable psvn
(require 'psvn)
So, I think my question needs revision. Since the lisp mod is not meant to simply enable lisp functionality for slime, how can I enable syntax highlighting in slime?
Edit 2:
The answer was provided in a comment.
Run slime then open / create a new file to work with. This is the buffer in which lisp -mode is supposed to be used.
The function is written, highlighted and sent to the REPL. The output is displayed at the bottom.
Both should interact, not integrate.
a source to share
Moved from comments: Typically you don't write large functions directly to the REPL buffer, but rather write them to another buffer and send them to the REPL via C-c C-c
. Slime-repl-mode has its own highlighting, but with a different purpose: it displays input, output and system messages in different colors (in my green-on-black setting it shows green, system messages are red, and the output is light blue ).
a source to share
Looks like you are entering lisp-mode
the buffer with the REPL, huh? If so, then you may be wrong. The REPL buffer probably has its own mode.
Taking a look at the documentation, the way to interact with Slime (as with most of the more complex Emacs processes) is to use bindings that evaluate the current sexp or region or buffer. See This page of the documentation page . None of the bindings in this link are simple keys RET
, which makes me think you have changed the REPL buffer mode.
More information will help, of course.
a source to share
When you do Mx slime, Slime starts and displays the REPL (the buffer with the REPL will be in slime-repl-mode. This slime-repl-mode controls the REPL.
lisp -mode, as it describes it, is "The main Lisp editing mode for Lisps, other than GNU Emacs Lisp." Lisp -mode is for file editing, not REPL. This is the intended behavior.
Rather, why would you want to switch the REPL to Lisp -mode?
a source to share