“Wrong type argument: commandp” error when binding a lambda to a key

global-set-key expects an interactive command. (lambda () (interactive) (forward-line 5)) ought to work.

By the way, C-h f commandp is a pretty good starting point for errors like that.

Leave a Comment