help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: REPL


From: Pascal Bourguignon
Subject: Re: REPL
Date: 28 Nov 2004 20:36:16 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Elvin Peterson <elvin_peterson@yahoo.com> writes:

> Maciek Pasternacki wrote:
> > On Boomtime, The Aftermath 40, 3170 YOLD, Elvin Peterson wrote:
> >
> >>How do I create a REPL for emacs for elisp?
> > Just use lisp-interaction-mode, there you can use C-j to evaluate
> > form
> > before the cursor and result is inserted into the buffer.  The initial
> > *scratch* buffer is started in this mode.
> >
> 
> That is quite painful to use, especially since I don't get the command
> recall and options to access outputs of previous commands.  Something
> like SLIME would be really nice.

Yes, some work hard on stuff like ilisp or slime to try to be able to
use other lisp like emacs-lisp, and others are not happy with
emacs-lisp REPL and want the harder lisp REPL...

If you want to get the answer when typing RET instead of C-u C-x C-e, use:

(defun newline-and-eval ()
  (interactive)
  (insert "\n")
  (eval-last-sexp t))

(local-set-key "C-j" 'newline-and-eval)

(and instead of typing RET when you want to insert a new line, type C-q RET)

Or you could use:

(local-set-key [C-return] 'newline-and-eval)

to differenciate a normal new-line (RET) from one when you want to
evaluate (C-return).

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
The world will now reboot; don't bother saving your artefacts.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]