[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
no connection lisp-mode buffer and *inferior-lisp*
From: |
Orm Finnendahl |
Subject: |
no connection lisp-mode buffer and *inferior-lisp* |
Date: |
Wed, 15 Oct 2003 12:34:36 +0200 |
User-agent: |
Mutt/1.5.4i |
Hi,
I posted the message below a couple of days ago and didn't get any
response. I guess not many people on this list are using ilisp but
maybe someone can redirect me to some place where I could get help?
--
Orm
---------------------- Begin forwarded message -------------------
since upgrading to emacs 21.3 I can't get the connection between a
source lisp file and an inferior lisp buffer. It used to work fine
before.
I started up an inferior lisp with "M-x run-lisp", which establishes
an *inferior-lisp* buffer. Trying to evaluate an expression in a
lisp-mode buffer, I get the error "You must start an inferior LISP
with run-ilisp" in the command buffer. Doing that and specifying
"lisp" as the Dialect won't help either.
Below is my configuration concerning lisp/scheme in my .emacs.
I had the same problem with scheme but found out that this goes away
if I switch to scheme-mode in an arbitrary buffer *before* issuing
"M-x run-scheme". After that it works with all scheme-mode buffers. I
suspect some scheme-mode hook taking care of establishing a link
between scheme mode buffers and the scheme process but couldn't find
the culprit. Now I just have (scheme-mode) in my .emacs as a
workaround. I'd rather solve that cleaner though.
Thanx for any hints,
Orm
--------------------------------------------------------------------
(setq inferior-lisp-program "/usr/local/bin/clisp")
(load-library "ilisp-scheme-easy-menu")
(setq scheme-program-name "guile -l /usr/share/guile/site/siteinit.scm")
(setq guile-program "guile -l /usr/share/guile/site/siteinit.scm")
;; Add new keybindings: C-x C-e evaluates the *next* form,
;; C-x C-m macroexpands the next form.
(defun lisp-eval-sexp (&optional and-go)
"Send the next sexp to the inferior Lisp process.
Prefix argument means switch to the Lisp buffer afterwards."
(interactive "P")
(lisp-eval-region (point)
(save-excursion (forward-sexp) (point))
and-go
) )
(defun lisp-macroexpand-region (start end &optional and-go)
"Macroexpand the current region in the inferior Lisp process.
Prefix argument means switch to the Lisp buffer afterwards."
(interactive "r\nP")
(comint-send-string
(inferior-lisp-proc)
(format "(macroexpand-1 (quote %s))\n" (buffer-substring start end))
)
(if and-go (switch-to-lisp t))
)
(defun lisp-macroexpand-sexp (&optional and-go)
"Macroexpand the next sexp in the inferior Lisp process.
Prefix argument means switch to the Lisp buffer afterwards."
(interactive "P")
(lisp-macroexpand-region (point)
(save-excursion (forward-sexp) (point))
and-go
) )
;; Define the great keybindings.
(inferior-lisp-install-letter-bindings)
------------------------------------------------------------------------
---------------------- End forwarded message --------------------------