schrieb am Mo., 27. März 2017 um 05:56 Uhr: > Philipp Stephani writes: > > > As an alternative, if people feel this would require too many > > parameters, I'd propose reverting the change that adds the documentation > > string. A docstring without arglist is not very useful. We could also > > remove the arity parameters and have the C function check the arity > > itself. > > Looking at this a bit closer, I do think this adds too many parameters, > and in particular, requiring to pass in names for positional parameters > just makes no sense. The names are never used (except for displaying > documentation). > > But removing the docstring is not great. IMO, the right solution here > is to use a subr-like object instead of a lambda, as suggested in a > FIXME in emacs-module.c: > > /* FIXME: Use a bytecompiled object, or even better a subr. */ > > Then the arity could be checked with `subr-arity' or similar. > This is now done (commit 31fded0370c3aa6d2c4370cae21cdb7475873483). This fixes (1) through (3). (4) through (6) are still open. That's probably OK if the limitations are documented; modules can always do the equivalent of (eval '(defun ...)) to get complete support.