diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2025-01-19 04:59:22 +0100 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2025-01-19 14:29:41 +0100 |
commit | 251e3d2654ae8e5fdee4624d9af93fb9c0e1b698 (patch) | |
tree | 5058c941d114e9b194310856b5351514e1b09bb5 /src/callint.c | |
parent | 7362f9f75d5aca1c97f920531dd62763918ba5fe (diff) | |
download | emacs-251e3d2654ae8e5fdee4624d9af93fb9c0e1b698.tar.gz emacs-251e3d2654ae8e5fdee4624d9af93fb9c0e1b698.tar.bz2 emacs-251e3d2654ae8e5fdee4624d9af93fb9c0e1b698.zip |
Replace call[1-8] with calln
Since the introduction of the 'calln' macro, the 'call1', 'call2', ...,
'call8' macros are just aliases for the former. This is slightly
misleading and potentially unhelpful. The number of arguments N can
also easily go out-of-synch with the used alias callN. There is no
reason not to replace these aliases with using 'calln' directly.
To reduce the risk for mistakes, the tool Coccinelle was used to make
these changes. See <https://coccinelle.gitlabpages.inria.fr/website/>.
* src/alloc.c, src/androidvfs.c, src/androidfns.c, src/buffer.c:
* src/callint.c, src/callproc.c, src/casefiddle.c, src/charset.c:
* src/chartab.c, src/cmds.c, src/coding.c, src/composite.c:
* src/data.c, src/dbusbind.c, src/dired.c, src/doc.c:
* src/emacs.c, src/eval.c, src/fileio.c, src/filelock.c:
* src/fns.c, src/frame.c, src/gtkutil.c, src/haikufns.c:
* src/haikumenu.c, src/image.c, src/insdel.c, src/intervals.c:
* src/keyboard.c, src/keymap.c, src/lisp.h, src/lread.c:
* src/minibuf.c, src/nsfns.m, src/nsselect.m, src/pgtkfns.c:
* src/pgtkselect.c, src/print.c, src/process.c, src/sort.c:
* src/syntax.c, src/textconv.c, src/textprop.c, src/undo.c:
* src/w32fns.c, src/window.c, src/xfaces.c, src/xfns.c:
* src/xmenu.c, src/xselect.c, src/xterm.c:
Replace all uses of 'call1', 'call2', ..., 'call8' with 'calln'.
Diffstat (limited to 'src/callint.c')
-rw-r--r-- | src/callint.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/callint.c b/src/callint.c index 40f3abae00e..9e9bcfd6b02 100644 --- a/src/callint.c +++ b/src/callint.c @@ -305,7 +305,7 @@ invoke it (via an `interactive' spec that contains, for instance, an Lisp_Object up_event = Qnil; /* Set SPECS to the interactive form, or barf if not interactive. */ - Lisp_Object form = call1 (Qinteractive_form, function); + Lisp_Object form = calln (Qinteractive_form, function); if (! CONSP (form)) wrong_type_argument (Qcommandp, function); Lisp_Object specs = Fcar (XCDR (form)); @@ -330,7 +330,7 @@ invoke it (via an `interactive' spec that contains, for instance, an and turn them into things we can eval. */ Lisp_Object values = quotify_args (Fcopy_sequence (specs)); fix_command (function, values); - call4 (Qadd_to_history, Qcommand_history, + calln (Qadd_to_history, Qcommand_history, Fcons (function, values), Qnil, Qt); } @@ -638,7 +638,7 @@ invoke it (via an `interactive' spec that contains, for instance, an goto have_prefix_arg; FALLTHROUGH; case 'n': /* Read number from minibuffer. */ - args[i] = call1 (Qread_number, callint_message); + args[i] = calln (Qread_number, callint_message); visargs[i] = Fnumber_to_string (args[i]); break; @@ -687,12 +687,12 @@ invoke it (via an `interactive' spec that contains, for instance, an break; case 'x': /* Lisp expression read but not evaluated. */ - args[i] = call1 (Qread_minibuffer, callint_message); + args[i] = calln (Qread_minibuffer, callint_message); visargs[i] = last_minibuf_string; break; case 'X': /* Lisp expression read and evaluated. */ - args[i] = call1 (Qeval_minibuffer, callint_message); + args[i] = calln (Qeval_minibuffer, callint_message); visargs[i] = last_minibuf_string; break; @@ -766,7 +766,7 @@ invoke it (via an `interactive' spec that contains, for instance, an visargs[i] = (varies[i] > 0 ? list1 (intern (callint_argfuns[varies[i]])) : quotify_arg (args[i])); - call4 (Qadd_to_history, Qcommand_history, + calln (Qadd_to_history, Qcommand_history, Flist (nargs - 1, visargs + 1), Qnil, Qt); } |