Re: redefining SBCL prompts
- From: "Mike G." <michael.graffam@xxxxxxxxx>
- Date: 30 May 2007 14:01:51 -0700
On May 30, 4:00 pm, Pillsy <pillsb...@xxxxxxxxx> wrote:
On May 30, 3:07 pm, "Mike G." <michael.graf...@xxxxxxxxx> wrote:
Can someone please post a few lines to show me the proper way to
redefine the REPL and DEBUG prompts in SBCL? Static strings are fine
for my use. Thank you.
You can redefine the REPL prompt by setting the variable SB-INT:*REPL-
PROMPT-FUNCTION* (provided you're using SBCL directly, instead of
SLIME or something, which evidently does its own prompt handling). You
want to set it to a function of a stream variable that will send the
desired prompt string to that stream. For example:
(setf sb-int:*repl-prompt-function*
(lambda (stream)
(format stream "~&Foo> ")))
I don't know how to change the debug prompt, though.
Cheers,
Pillsy
Thanks, thats a step in the right direction! This was fairly straight-
forward
for me to do on CMUCL and Clisp. Thanks again for the information, and
if someone
else knows how to change the DEBUG prompt, I'd would very much
appreciate it.
Both changes are vital, as I'm interfacing SBCL to TeXmacs (a WYSIWYG
TeX editor).
This enables SBCL output to appear directly in TeXmacs, SBCL code can
generate
graphical depictions of trees, graphs, pretty-print matrices and so
on.
TeXmacs requires that coding be placed into the communication stream
so that
it knows when the slave program (SBCL in this case) is expecting
input.
-M
.
- Follow-Ups:
- Re: redefining SBCL prompts
- From: Pillsy
- Re: redefining SBCL prompts
- References:
- redefining SBCL prompts
- From: Mike G.
- Re: redefining SBCL prompts
- From: Pillsy
- redefining SBCL prompts
- Prev by Date: Re: redefining SBCL prompts
- Next by Date: Re: Lisp for generating VHDL code?
- Previous by thread: Re: redefining SBCL prompts
- Next by thread: Re: redefining SBCL prompts
- Index(es):
Relevant Pages
|