You are missing the argument list of your test function, which is why Emacs interprets the form (interactive) as an arglist. Thus, you defined a non-interactive function from 1 argument instead of an interactive command without arguments.
What would you like:
(defun test () "My command test" (interactive) (message "hello"))
Lessons learned:
- Always add a doc line - if you did, Emacs complained
- Use
elint (comes with Emacs, try Cha elint RET ).
source share