I've finally gotten Ilisp and STk to work together. The problem was that Ilisp starts processes up using a pipe, and this causes all kinds of problems with buffers and STk thinking that it is not in interactive mode.
So I added a -interactive switch for starting STk up from Ilisp - it basically forces STk_interactivep to be TRUE, and that causes STk to print up it's banner properly, print the prompt and do some flushing. I found I also needed to set the buffers for stdin, stdout and stderr to NULL to get flushing. I'm not sure I understand why.
Anyhow, here are the diffs and my current definition of an STk dialect for ilisp. Anyone who hasn't tried ilisp yet and is doing any kind of lisp/scheme programming, should check it out - it is a really useful tool.
S.
42a43
> int STk_arg_interactive = 0;
59a61
> {"-interactive", "\tInteractive mode"},
115a118
> if (strcmp(p->key, "-interactive") == 0) {STk_arg_interactive = TRUE; break; }
349a350
> extern int STk_arg_interactive;
255c255
< STk_interactivep = isatty(fileno(stdin));
---
> STk_interactivep = (STk_arg_interactive ? TRUE : isatty(fileno(stdin)));
304a305,309
>
> /* Disable buffering - suggestion from ILISP mailing list. */
> setbuf (stdout, (char *) 0);
> setbuf (stderr, (char *) 0);
>
(defdialect stk "STk Scheme"
scheme
(setq comint-prompt-regexp "^STk> ")
(setq ilisp-describe-command "(describe %s)")
(setq ilisp-program "stk")
(setq comint-ptyp t)
(setq comint-always-scroll t)
(setq ilisp-last-command "*")
)
(provide 'ilisp-stk )
Received on Tue Jun 13 1995 - 20:55:46 CEST