elisp, pass arguments but specify optional

37 Views Asked by At
(defun helm-do-ag (&optional basedir targets default-input)

I want to call the above function with default-input, leaving basedir targets empty

Do I call (helm-do-ag nil nil "something") ?

1

There are 1 best solutions below

0
phils On BEST ANSWER

Correct. Unspecified optional arguments get the value nil by default, and so passing nil for them explicitly is no different.