Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strange autocompletion result in emacs + common lisp

I am using Emacs with SLIME for my development environment. When I type (write-to and then C-M-i I get the following autocompletions:

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

I know Common Lisp is powerful, but I guess write-to-sting is not in the ANSI standard. Google didn't offer a single hit for this function. Then I tried to find it in the SBCL code, but alas

(documentation 'write-to-sting 'function) returns nil so it doesn't have a documentation string.

When I try to execute the function (write-to-sting) I get The function COMMON-LISP-USER::WRITE-TO-STING is undefined.

Apropos also finds an unbound function:

(apropos 'write-to)
WRITE-TO
WRITE-TO-STING
WRITE-TO-STRING (fbound)

My question is: What is going on? Does anyone knows the story behind this function?

like image 454
tsikov Avatar asked Sep 27 '16 07:09

tsikov


1 Answers

At some point during your interaction with the Lisp environment, you wrote write-to-sting and it was read by the Lisp reader. The symbol was interned in the COMMON-LISP-USER package. After all, maybe you intended to implement a function that sends an email to Sting, who knows? Auto-completion works by filtering the currently known symbols in the environment.

You can safely (unintern 'write-to-sting) (or implement it).

like image 85
coredump Avatar answered Oct 18 '22 11:10

coredump