Skip to content
Chris Petersen edited this page Oct 7, 2015 · 1 revision

Emacs is often used for interactive development and debugging of Scheme and LISP programs. LambdaNative includes support for this through the ln_repl module.

Emacs configuration

To install the Emacs modes and configure emacs for use with LambdaNative, use the following command in the lambdanative framework directory:

make .emacs

This will create or update the system .emacs file automatically. LambdaNative uses quack, paredit and scheme-complete to provide a rich development environment within Emacs, including REPL, bracket management, syntax highlighting and tab completion.

App configuration

To use the Emacs REPL mode, simply include the ln_repl module in the app MODULES file.

Example

Step 1. Configure emacs (only needed once)

> make .emacs
..

Step 2. Modify the default MODULES file in DemoRedSquare to include ln_repl

> cat apps/DemoRedSquare/MODULES
config eventloop ln_core ln_glcore ln_glgui ln_repl

Step 3. Make the app for the localhost

./configure DemoRedSquare
make
make install

The ln_repl module automatically creates a TCP-based REPL on port 7000. The system may prompt to allow this when the app starts.

Step 4. Launch Emacs, and start a REPL by typing META-x run-scheme. A REPL will now appear in the scheme buffer:

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
----
LambdaNative REPL
DemoRedSquare 1.0
Built 2015-10-07 09:51:12 (00h 00m 22s ago)
> (+ 1 2)
3
Clone this wiki locally