diff options
author | Joakim Verona <joakim@verona.se> | 2015-01-25 21:19:27 +0100 |
---|---|---|
committer | Joakim Verona <joakim@verona.se> | 2015-01-25 21:19:27 +0100 |
commit | d522fd8ca73e668bfafd0419bc5f71f2751cca24 (patch) | |
tree | 4b57a4d2d26e578035801f1c895dcfda5895e09d /src/lisp.h | |
parent | e5087278b9bcab5847ce63d80c0d74c27f50e719 (diff) | |
parent | a3689d3c661fe36df971c875760f8d500b5ae994 (diff) | |
download | emacs-d522fd8ca73e668bfafd0419bc5f71f2751cca24.tar.gz |
Merge branch 'master' into xwidget
Diffstat (limited to 'src/lisp.h')
-rw-r--r-- | src/lisp.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h index 76a9ed8f159..87bc3efd198 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2803,6 +2803,15 @@ enum maxargs UNEVALLED = -1 }; +/* Call a function F that accepts many args, passing it ARRAY's elements. */ +#define CALLMANY(f, array) (f) (ARRAYELTS (array), array) + +/* Call a function F that accepts many args, passing it the remaining args, + E.g., 'return CALLN (Fformat, fmt, text);' is less error-prone than + '{ Lisp_Object a[2]; a[0] = fmt; a[1] = text; return Fformat (2, a); }'. + CALLN is overkill for simple usages like 'Finsert (1, &text);'. */ +#define CALLN(f, ...) CALLMANY (f, ((Lisp_Object []) {__VA_ARGS__})) + extern void defvar_lisp (struct Lisp_Objfwd *, const char *, Lisp_Object *); extern void defvar_lisp_nopro (struct Lisp_Objfwd *, const char *, Lisp_Object *); extern void defvar_bool (struct Lisp_Boolfwd *, const char *, bool *); |