unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to evaluating expressions in *inferior-lisp* buffer  programatically?
@ 2009-03-14 16:07 budu
  2009-03-14 16:24 ` Pascal J. Bourguignon
  0 siblings, 1 reply; 4+ messages in thread
From: budu @ 2009-03-14 16:07 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-03-14 19:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-14 16:07 How to evaluating expressions in *inferior-lisp* buffer programatically? budu
2009-03-14 16:24 ` Pascal J. Bourguignon
2009-03-14 19:15   ` budu
2009-03-14 19:54     ` Pascal J. Bourguignon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).