hello
How do I specify a function which has optional numeric prefix, if not, it prompts for a number? basically how goto-line behaves?
(defun my-function(&optional n)
; I have tried
(interactive "N") ; reads string, no prompt
(interactive "p") ; defaults to one
(interactive (if (not n) (read-number "N: "))) ; runtime error
so how do I make work? thanks