This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Using Emacs with Kawa
- From: Chris Dean <ctdean at sokitomi dot com>
- To: "Tony anon" <tonys-mailbox at hotmail dot com>
- Cc: kawa at sources dot redhat dot com
- Date: Mon, 10 Apr 2006 12:30:38 -0700
- Subject: Re: Using Emacs with Kawa
- References: <BAY115-F1976E1DD321992571FD83BE1CC0@phx.gbl>
> 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