3

You can use func-arity added in 26.1. C-h f func-arity: func-arity is a built-in function in `C source code'. (func-arity FUNCTION) Return minimum and maximum number of args allowed for FUNCTION. FUNCTION must be a function of some kind. The returned value is a cons cell (MIN . MAX). MIN is the minimum number of args. MAX is the maximum ...


2

Not exactly. Function buffer-substring requires two arguments. Function - will accept a single argument, but in that case it just returns the negative of that numeric argument. What you want to do is, in effect, apply such functions to a list of arguments. You can use higher-order function apply to do that. What you can do, if you want, is have a macro or ...


2

(mapcar (lambda (fn) (funcall fn 1)) '(desktop-save-mode show-paren-mode))


Only top voted, non community-wiki answers of a minimum length are eligible