From: Chris Dean <ctdean@sokitomi.com>
To: "Tony anon" <tonys-mailbox@hotmail.com>
CC: kawa@sources.redhat.com
Subject: Re: Using Emacs with Kawa
Date: Mon, 10 Apr 2006 12:30:38 -0700
> Specifically, when I'm defining a function, a prompt similar to the
> following appears:
>
> #|(---:2|#
Here's my two cents (in addition to the other responses). What I do
is:
1. Use cmuscheme in Emacs, it works the best for me.
(autoload 'scheme-mode "cmuscheme" "Major mode for Scheme." t)
(autoload 'run-scheme "cmuscheme" "Switch to interactive Scheme
buffer." t)
2. Set the kawa binary in Emacs.
(setq scheme-program-name "/your/kawa/name ...")
3. Make Emacs recognize the kawa prompt:
(defun my-inferior-scheme-mode-hook ()
(turn-on-font-lock)
(setq comint-process-echoes t)
(setq comint-prompt-regexp "^#[^#]+# +"))
(add-hook 'inferior-scheme-mode-hook 'my-inferior-scheme-mode-hook)
4. In the Kawa startup file (I think it's ~/.kawarc.scm) change the
Kawa prompt to not put those open parens as continuation lines.
(define (my-no-continuation-prompter port)
(define (prompt port s)
(string-append "#|"
s
(number->string (input-port-line-number port))
"|# "))
(let ((state (input-port-read-state port)))
(cond
((char=? state #\Newline) "")
((char=? state #\Space) (prompt port "kawa:" ))
((char=? state #\() "")
(else ""))))
(set-input-port-prompter! (current-input-port)
my-no-continuation-prompter)
Good luck!
Regards,
Chris Dean