-
Notifications
You must be signed in to change notification settings - Fork 136
Emacs setup
rvirding edited this page Sep 13, 2010
·
5 revisions
Put the following in your ~/.emacs:
;; LFE mode. ;; Set lfe-dir to point to where the lfe emacs files are. (defvar lfe-dir (concat (getenv "HOME") "/git/lfe/emacs")) (setq load-path (cons lfe-dir load-path)) (require 'lfe-start)
Create a shell script in your top LFE dir and name it run, like:
#!/bin/bash function send { screen -X stuff "$1" sleep 0.02 } send $"$(cat myhistory)" send $'\n'
Then add to your ~/.emacs:
(global-set-key (kbd "<f12>") 'my-save-and-compile) (defun my-save-and-compile () (interactive "") (save-buffer 0) (compile "./run"))
Now, if you run your LFE REPL in a screen session, you can eval your content in your myhistory file
from an Emacs buffer by pressing F12. Example:
(slurp '"src/prelude.lfe") (: prelude take 3 '(1 2 3 4 5 6)) ; ...now press F12 and watch the above be evaluated in your REPL...