I'm trying to define the keymap for a major mode but keep getting the error:
Wrong type argument: keymapp.
What am I doing wrong?
(defun insert-text () (interactive) (let ((x (read-string "Enter text to be printed: "))) (insert x))) (defvar test-mode-map (let ((map (make-keymap))) (define-key map (kbd "M-S-RET") 'insert-text))) (defun test-mode () (interactive) (setq major-mode 'test-mode mode-name "Test Mode") (use-local-map test-mode-map))
I read another question with a similar error but it doesn't really help.