I have this function in my .emacs file that I thought used to work properly but now doesn't:
(defun insert-date ()
(interactive "i")
(insert (format-time-string "%Y-%m-%d")))
Emacs gives the error when I issue M-x insert-date:
call-interactively: Wrong number of arguments: (lambda nil (interactive "i") (insert (format-time-string "%Y-%m-%d"))), 1
I thought the i argument to interactive tells Emacs to ignore any arguments because none are expected. What is wrong with the command that prevents me from using it like I think it should be used?