奇怪的自动完成导致emacs +常见的lisp

tsi*_*kov 7 common-lisp slime completion

我在我的开发环境中使用Emacs和SLIME.当我输入(write-to然后C-M-i我得到以下自动填充:

Click on a completion to select it.
In this buffer, type RET to select the completion near point.

Possible completions are:
write-to-sting
write-to-string
Run Code Online (Sandbox Code Playgroud)

我知道Common Lisp很强大,但我猜write-to-sting不是ANSI标准.谷歌没有为这个功能提供一次点击.然后我试着在SBCL代码中找到它,但是

(documentation 'write-to-sting 'function)返回,nil因此它没有文档字符串.

当我尝试执行(write-to-sting)我得到的功能时The function COMMON-LISP-USER::WRITE-TO-STING is undefined.

Apropos还发现了一个未绑定的函数:

(apropos 'write-to)
WRITE-TO
WRITE-TO-STING
WRITE-TO-STRING (fbound)
Run Code Online (Sandbox Code Playgroud)

我的问题是:发生了什么事?有谁知道这个功能背后的故事?

cor*_*ump 9

在您与Lisp环境交互期间的某个时刻,编写write-to-sting并且它由Lisp读取器读取.该符号在COMMON-LISP-USER包中实现.毕竟,也许你打算实现一个向Sting发送电子邮件的功能,谁知道呢?自动完成通过过滤环境中当前已知的符号来工作.

您可以安全地(unintern 'write-to-sting)(或实施它).