slime/slime — pull request #215 by ivan4th (2014-12-07 19:43:49+00:00)
Title: Add *FUZZY-DUPLICATE-SYMBOL-FILTER*.

The default symbol deduplication behavior in swank-fuzzy doesn't play nicely with newer things like UIOP library and package-inferred-system feature of ASDF3. In these cases, many symbols are supposed to be used from packages that are reexporting them. For instance, UIOP/PATHNAME:ENSURE-DIRECTORY-PATHNAME is exported from UIOP package and UIOP:ENSURE-DIRECTORY-PATHNAME is preferred name. But as of now, typing uio:ensu-dir-pa and using fuzzy completion on it gives uiop/pathname:ensure-directory-pathname which isn't desirable in this case.

This patch adds *FUZZY-DUPLICATE-SYMBOL-FILTER* which makes it possible to customize this behavior in ~/.swank.lisp. For example, setting the variable to :NEAREST-PACKAGE makes the deduplication algorithm choose packages that represent closest matches for the package portion of initial string. Custom filter functions are also supported so user may add customizations that 'blacklist' some packages and so on.

The behavior of swank-fuzzy isn't changed by default.