amx
amx copied to clipboard
amx completion includes commands that are not defined anymore
amx completion includes history elements that may not correspond to actually commands (i.e., commandp returns nil for them).
Invoking such commands always produces an error, so I think they should not be suggested even if they appear in history.
This can be confusing if:
- If a package was updated and the command no longer exists
- If the command was defined in some package but was not autoloaded, and that package isn't loaded at startup
reproduction steps
-
emacs(no-qbecause that disables amx). Assume that the init file enablesamx-mode. -
Define some command, or load a file which does:
(defun this-is-a-deleted-command () (interactive) (message "This command will be deleted in a future update of this package.")) -
M-x this-is-a-deleted-command -
kill-emacsand restart Emacs -
M-x this-iscontainsthis-is-a-deleted-commanddespite that command not being defined. -
Press
RET. This produces a type error:Wrong type argument: commandp, this-is-a-deleted-command