This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using Emacs with Kawa


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


Thanks for the info Chris.


I'm afraid that kawa is ignoring the change to the prompt in kawarc.scm.

I can confirm that the initialisation file is being read, as I tried deliberately corrupting it and received an error from Kawa on startup.

However, when I change the prompt string in the initialisation file, there is no apparent change to the prompt in the kawa repl.

Does anyone have any further thoughts?

Thankyou.

Tony

_________________________________________________________________
realestate.com.au: the biggest address in property http://ninemsn.realestate.com.au



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]