Emacs Lisp error "Wrong type argument: commandp"

Viewed 6667

What is wrong with the following code:

(defun test
  (interactive)
  (message "hello"))
(global-set-key '[f4]  'test)

When evaluating this with eval-region and then pressing F4 I get the error:

Wrong type argument: commandp, test
1 Answers
Related