On 06/13/2013 01:08 PM, Stefan Monnier wrote: > Can't we use something like > > #define FUNCTION_OF_MACRO(fun, type_in, type_out) \ > LISP_INLINE type_out (fun) (type_in x) { return lisp_h_##fun (x); } Sure, though we need to adjust that a bit, as the function can take multiple args, and it might return void (where the 'return' keyword must be omitted). The following variant works for me, and the attached combined patch implements this suggestion. /* Define NAME as a lisp.h inline function that returns TYPE and has arguments declared as ARGDECLS and passed as ARGS. ARGDECLS and ARGS should be parenthesized. Implement the function by calling lisp_h_NAME ARGS. */ #define LISP_MACRO_DEFUN(name, type, argdecls, args) \ LISP_INLINE type (name) argdecls { return lisp_h_##name args; } /* like LISP_MACRO_DEFUN, except NAME returns void. */ #define LISP_MACRO_DEFUN_VOID(name, argdecls, args) \ LISP_INLINE void (name) argdecls { lisp_h_##name args; }