[CM] ilisp and emacs 21.3

Orm Finnendahl finnendahl@folkwang-hochschule.de
Thu, 16 Oct 2003 19:47:11 +0200


Hi all,

since upgrading to emacs 21.3 I can't get the connection between a
buffer with a source lisp file and an inferior lisp buffer. It used to
work fine before. I already posted to the emacs list but didn't get
any answer. Maybe nobody is using emacs with lisp there. If someone
has a working .emacs with emacs 21.3 it'd be nice if I could get a
copy of the relevant lines.

Below is a description of the problem which I posted to help-gnu-emacs.
--
Orm

-----------------------------------------------------------------
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)
------------------------------------------------------------------------