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

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

Re: REPL


From: Oliver Scholz
Subject: Re: REPL
Date: Sat, 04 Dec 2004 12:21:49 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux)

[Since M-x ielm has already been pointed to by others ...]

Elvin Peterson <address@hidden> writes:
[...]
> IIRC, the REPL code for COMMON LISP is just a couple of lines, so I
> was hoping someone would post similar stuff for emacs.

Sure, to get a very basic REPL in Emacs is simple:

;; Because we use `loop' for the looks of it:
(require 'cl)

(let* ((buffer (generate-new-buffer "*tmp*"))
       (standard-output buffer))
  (switch-to-buffer buffer)
  ;; The REPL:
  (loop (print (eval (read)))))

The extra code in ielm is to get something a tiny little bit more
comfortable.

    Oliver
-- 
14 Frimaire an 213 de la Révolution
Liberté, Egalité, Fraternité!


reply via email to

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