On Wed, May 28, 2003 at 04:47:38PM -0700, Miles Egan wrote:
> One of my small but recurring frustrations with cmucl and now sbcl is
> that there doesn't seem to be a single consistent way to bail out of the
> repl. It's nice that sbcl lets me exit with ctrl-d from the toplevel,
> but it seems like I need a variety of incantations to get out of it at
> other times, q, (quit), [n] then ctrl-d.
As far as I can tell, (QUIT) should work as a general-purpose
incantation, unless you tend to work in packages which don't use the
> Would it be possible/reasonable to make a ctrl-d from the terminal
> always bail out, no matter where sbcl is?
It would certainly be possible. It would even be consistent, and if
SBCL were the only Lisp environment in the world I'd likely have set
it up that way early on.
However, I'm not sure it's a good idea. Some other Lisp environments
interpret Ctrl-D at the debugger prompt as "leave [one level of] the
debugger", returning to the just-surrounding layer of Lisp. For anyone
who is accustomed to this behavior and in the habit of using it, an
"always bail out" interpretation of Ctrl-D might be less a convenience
than an annoying hazard to worry about.
Judging from the way that shells tend to have variables to control
this kind of behavior, I doubt there's any way to get it right for
everyone. And I'm temperamentally disinclined to use variables to
avoid UI decisions like this, partly since the catalog of such
variables tends to get annoyingly long.
My own habit is to use Ctrl-D at toplevel. In the debugger I generally
need to think anyway ("Why did I get here? What did I do wrong? Why
did I even bother to get out of bed this morning?") and I generally do
at least one poke-around-and-see debugger command (BACKTRACE, SOURCE,
whatever) so using a debugger command to escape from the debugger
doesn't seem unnatural.
William Harold Newman <william.newman@...>
"Well, it's not like a light bulb going off. It's more like
there's something irritating you and you fix it until it goes
away." -- James Gosling on innovation
PGP key fingerprint 85 CE 1C BA 79 8D 51 8C B9 25 FB EE E0 C3 E5 7C