👩💻 Join our community of thousands of amazing developers!
Premise We need to turn an arbitrary defun into a cl-defun because cl-defun has the &key parameter option which allows us to specify named arguments as opposed to positional arguments. Solution I made a macro to do this automatically. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 (defmacro cl-genfuncwrapper (fun) (let* ( (newfun (intern (concat "cl-" (symbol-name fun)))) (optional nil) (sigbuilder (-flatten (cl-loop for e in (help-function-arglist fun) collect (progn (if (eq '&optional ...