:config should take a function, not a form
User code should be passed in as a function and evaluated with (funcall func)
; passing a form to eval
prevents byte-compilation and doesn't allow for compiler warnings.
See Emacs Lisp Lambda Expressions Are Not Self-Evaluating#eval-after-load and A Handy Emacs Package Configuration Macro#The problem with eval-after-load for where I learned this from.
If surface syntax is a concern, perhaps general.el
's approach can work: hercules-def
can become a macro so that the user can enjoy a compiler warnings and less quotes, while (say) hercules-define
is the function that takes quoted input. This would be like general-def
and general-define-key
.
Edited by Kisaragi Hiu