我目前正在使用 LispWorks,我想设置 REPL,以便只需键入对应的数字即可退出调试器(abort) Return to top loop level 0
,就像使用 SBCL 一样。
通常,使用 LispWorks 需要键入:c + [abort option number]
.
看一个简单的例子,使用 LispWorks:
CL-USER 1 > a
Error: The variable A is unbound.
1 (continue) Try evaluating A again.
2 Return the value of :A instead.
3 Specify a value to use this time instead of evaluating A.
4 Specify a value to set A to.
5 (abort) Return to top loop level 0.
Type :b for backtrace or :c <option number> to proceed.
Type :bug-form "<subject>" for a bug report template or :? for other options.
CL-USER 2 : 1 > :c 5
CL-USER 3 >
使用 SBCL 时,只要数字就足够了:
* a
debugger invoked on a UNBOUND-VARIABLE in thread
#<THREAD "main thread" RUNNING {10012E0613}>:
The variable A is unbound.
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [CONTINUE ] Retry using A.
1: [USE-VALUE ] Use specified value.
2: [STORE-VALUE] Set specified value and use it.
3: [ABORT ] Exit debugger, returning to top level.
(SB-INT:SIMPLE-EVAL-IN-LEXENV A #<NULL-LEXENV>)
0] 3
*
REPL 调试器命令文档似乎没有列出这种可能性。
如果可能的话,如何退出 LispWorks REPL 调试器,返回到顶层,只输入一个数字,就像使用 SBCL 一样?