【问题标题】:Strange autocompletion result in emacs + common lisp奇怪的自动完成导致 emacs + common lisp
【发布时间】:2017-02-04 16:56:41
【问题描述】:

我在开发环境中使用带有 SLIME 的 Emacs。当我输入 (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

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

(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)

我的问题是:这是怎么回事?有谁知道这个功能背后的故事?

【问题讨论】:

    标签: common-lisp slime completion


    【解决方案1】:

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

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

    【讨论】:

    • facepalm 我做了以下测试:我写(blablabla),退出调试器,然后(apropos 'bla)显示功能......所以你是对的 - 输入错误该函数将输入错误的版本...
    猜你喜欢
    • 2017-08-18
    • 2014-07-11
    • 1970-01-01
    • 2021-11-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-27
    • 2016-01-10
    相关资源
    最近更新 更多