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

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

How to evaluating expressions in *inferior-lisp* buffer programatically


From: budu
Subject: How to evaluating expressions in *inferior-lisp* buffer programatically?
Date: Sat, 14 Mar 2009 09:07:35 -0700 (PDT)
User-agent: G2/1.0

Hi, I've been using Emacs for a few year, but I'm just starting to
customize it more deeply. I wonder what is the recommended way of
evaluating expressions in the current *inferior-lisp* buffer
programatically? I know macros would certainly be OK for such a simple
task, yet I tried with elisp and come up with this:

    (save-current-buffer
      (set-buffer "*inferior-lisp*")
      (insert "(use '(foo [bar]))")
      (lisp-eval-last-sexp)
      (let ((s (point)))
        (backward-sexp)
        (delete-region s (point))))

Do you know of a more straightforward way of doing this? And do you
know of any good tutorial on basic elisp? Thanks

- budu


reply via email to

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