From 121731dbe06f1e68c897cb0b2224177e86db40dd Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 19 Jan 2025 04:59:22 +0100 Subject: [PATCH] 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 . * 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'. (cherry picked from commit 251e3d2654ae8e5fdee4624d9af93fb9c0e1b698) --- src/alloc.c | 4 +- src/androidfns.c | 13 +++--- src/androidvfs.c | 2 +- src/buffer.c | 17 ++++---- src/callint.c | 12 ++--- src/callproc.c | 2 +- src/casefiddle.c | 2 +- src/charset.c | 6 +-- src/chartab.c | 18 ++++---- src/cmds.c | 2 +- src/coding.c | 6 +-- src/composite.c | 2 +- src/data.c | 6 +-- src/dbusbind.c | 2 +- src/dired.c | 18 ++++---- src/doc.c | 6 +-- src/emacs.c | 4 +- src/eval.c | 14 +++--- src/fileio.c | 111 +++++++++++++++++++++++------------------------ src/filelock.c | 14 +++--- src/fns.c | 26 +++++------ src/frame.c | 22 +++++----- src/gtkutil.c | 4 +- src/haikufns.c | 12 ++--- src/haikumenu.c | 2 +- src/image.c | 2 +- src/insdel.c | 2 +- src/intervals.c | 8 ++-- src/keyboard.c | 26 +++++------ src/keymap.c | 12 ++--- src/lisp.h | 2 +- src/lread.c | 30 ++++++------- src/minibuf.c | 36 +++++++-------- src/nsfns.m | 15 +++---- src/nsselect.m | 2 +- src/pgtkfns.c | 12 ++--- src/pgtkselect.c | 6 +-- src/print.c | 2 +- src/process.c | 10 ++--- src/sort.c | 4 +- src/syntax.c | 8 ++-- src/textconv.c | 2 +- src/textprop.c | 2 +- src/undo.c | 2 +- src/w32fns.c | 17 ++++---- src/window.c | 22 +++++----- src/xfaces.c | 12 ++--- src/xfns.c | 13 +++--- src/xmenu.c | 2 +- src/xselect.c | 2 +- src/xterm.c | 6 +-- 51 files changed, 287 insertions(+), 297 deletions(-) diff --git a/src/alloc.c b/src/alloc.c index e7290c55f88..d2d68256139 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -669,7 +669,7 @@ malloc_warning (const char *str) void display_malloc_warning (void) { - call3 (Qdisplay_warning, + calln (Qdisplay_warning, Qalloc, build_string (pending_malloc_warning), QCemergency); @@ -7794,7 +7794,7 @@ respective remote host. */) = Ffind_file_name_handler (BVAR (current_buffer, directory), Qmemory_info); if (!NILP (handler)) - return call1 (handler, Qmemory_info); + return calln (handler, Qmemory_info); #if defined HAVE_LINUX_SYSINFO struct sysinfo si; diff --git a/src/androidfns.c b/src/androidfns.c index ac0f4882f60..f8e3d397008 100644 --- a/src/androidfns.c +++ b/src/androidfns.c @@ -2127,7 +2127,7 @@ android_create_tip_frame (struct android_display_info *dpyinfo, { Lisp_Object bg = Fframe_parameter (frame, Qbackground_color); - call2 (Qface_set_after_frame_default, frame, Qnil); + calln (Qface_set_after_frame_default, frame, Qnil); if (!EQ (bg, Fframe_parameter (frame, Qbackground_color))) { @@ -2166,7 +2166,7 @@ android_hide_tip (bool delete) { if (!NILP (tip_timer)) { - call1 (Qcancel_timer, tip_timer); + calln (Qcancel_timer, tip_timer); tip_timer = Qnil; } @@ -2350,7 +2350,7 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, tip_f = XFRAME (tip_frame); if (!NILP (tip_timer)) { - call1 (Qcancel_timer, tip_timer); + calln (Qcancel_timer, tip_timer); tip_timer = Qnil; } @@ -2389,11 +2389,11 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, } else tip_last_parms - = call2 (Qassq_delete_all, parm, tip_last_parms); + = calln (Qassq_delete_all, parm, tip_last_parms); } else tip_last_parms - = call2 (Qassq_delete_all, parm, tip_last_parms); + = calln (Qassq_delete_all, parm, tip_last_parms); } /* Now check if every parameter in what is left of @@ -2567,8 +2567,7 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, start_timer: /* Let the tip disappear after timeout seconds. */ - tip_timer = call3 (Qrun_at_time, timeout, Qnil, - Qx_hide_tip); + tip_timer = calln (Qrun_at_time, timeout, Qnil, Qx_hide_tip); return unbind_to (count, Qnil); #endif diff --git a/src/androidvfs.c b/src/androidvfs.c index d7284a4cc85..656ff7003dd 100644 --- a/src/androidvfs.c +++ b/src/androidvfs.c @@ -7911,7 +7911,7 @@ files will be removed. */) file = ENCODE_FILE (Fexpand_file_name (file, Qnil)); - if (!NILP (call1 (Qfile_remote_p, file))) + if (!NILP (calln (Qfile_remote_p, file))) signal_error ("Cannot relinquish access to remote file", file); vp = android_name_file (SSDATA (file)); diff --git a/src/buffer.c b/src/buffer.c index 158ebbe0c30..1b9092b107b 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -503,7 +503,7 @@ See also `find-buffer-visiting'. */) handler = Ffind_file_name_handler (filename, Qget_file_buffer); if (!NILP (handler)) { - Lisp_Object handled_buf = call2 (handler, Qget_file_buffer, + Lisp_Object handled_buf = calln (handler, Qget_file_buffer, filename); return BUFFERP (handled_buf) ? handled_buf : Qnil; } @@ -558,7 +558,7 @@ run_buffer_list_update_hook (struct buffer *buf) { eassert (buf); if (! (NILP (Vrun_hooks) || buf->inhibit_buffer_hooks)) - call1 (Vrun_hooks, Qbuffer_list_update_hook); + calln (Vrun_hooks, Qbuffer_list_update_hook); } DEFUN ("get-buffer-create", Fget_buffer_create, Sget_buffer_create, 1, 2, 0, @@ -1707,8 +1707,7 @@ This does not change the name of the visited file (if any). */) run_buffer_list_update_hook (current_buffer); - call2 (Quniquify__rename_buffer_advice, - requestedname, unique); + calln (Quniquify__rename_buffer_advice, requestedname, unique); /* Refetch since that last call may have done GC. */ return BVAR (current_buffer, name); @@ -1748,7 +1747,7 @@ exists, return the buffer `*scratch*' (creating it if necessary). */) if (candidate_buffer (buf, buffer) /* If the frame has a buffer_predicate, disregard buffers that don't fit the predicate. */ - && (NILP (pred) || !NILP (call1 (pred, buf)))) + && (NILP (pred) || !NILP (calln (pred, buf)))) { if (!NILP (visible_ok) || NILP (Fget_buffer_window (buf, Qvisible))) @@ -1764,7 +1763,7 @@ exists, return the buffer `*scratch*' (creating it if necessary). */) if (candidate_buffer (buf, buffer) /* If the frame has a buffer_predicate, disregard buffers that don't fit the predicate. */ - && (NILP (pred) || !NILP (call1 (pred, buf)))) + && (NILP (pred) || !NILP (calln (pred, buf)))) { if (!NILP (visible_ok) || NILP (Fget_buffer_window (buf, Qvisible))) @@ -1935,7 +1934,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) { /* Ask whether to kill the buffer, and exit if the user says "no". */ - if (NILP (call1 (Qkill_buffer__possibly_save, buffer))) + if (NILP (calln (Qkill_buffer__possibly_save, buffer))) return unbind_to (count, Qnil); /* Recheck modified. */ modified = BUF_MODIFF (b) > BUF_SAVE_MODIFF (b); @@ -4180,9 +4179,9 @@ call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, bool after, while (CONSP (list)) { if (NILP (arg3)) - call4 (XCAR (list), overlay, after ? Qt : Qnil, arg1, arg2); + calln (XCAR (list), overlay, after ? Qt : Qnil, arg1, arg2); else - call5 (XCAR (list), overlay, after ? Qt : Qnil, arg1, arg2, arg3); + calln (XCAR (list), overlay, after ? Qt : Qnil, arg1, arg2, arg3); list = XCDR (list); } } diff --git a/src/callint.c b/src/callint.c index ca6e8fe1512..c8d29040d3d 100644 --- a/src/callint.c +++ b/src/callint.c @@ -296,7 +296,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)); @@ -321,7 +321,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); } @@ -626,7 +626,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; @@ -675,12 +675,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; @@ -754,7 +754,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); } diff --git a/src/callproc.c b/src/callproc.c index 66d12adfec7..a70c374881f 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -914,7 +914,7 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd, /* If the caller required, let the buffer inherit the coding-system used to decode the process output. */ if (inherit_process_coding_system) - call1 (Qafter_insert_file_set_buffer_file_coding_system, + calln (Qafter_insert_file_set_buffer_file_coding_system, make_fixnum (total_read)); } diff --git a/src/casefiddle.c b/src/casefiddle.c index 68b8dc63dbe..faeb16fb8f2 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -583,7 +583,7 @@ casify_pnc_region (enum case_action flag, Lisp_Object beg, Lisp_Object end, { if (!NILP (region_noncontiguous_p)) { - Lisp_Object bounds = call1 (Vregion_extract_function, Qbounds); + Lisp_Object bounds = calln (Vregion_extract_function, Qbounds); FOR_EACH_TAIL (bounds) { CHECK_CONS (XCAR (bounds)); diff --git a/src/charset.c b/src/charset.c index c41a6622f00..797dfde276f 100644 --- a/src/charset.c +++ b/src/charset.c @@ -684,7 +684,7 @@ map_charset_for_dump (void (*c_function) (Lisp_Object, Lisp_Object), if (c_function) (*c_function) (arg, range); else - call2 (function, range, arg); + calln (function, range, arg); XSETCAR (range, Qnil); } if (c == stop) @@ -697,7 +697,7 @@ map_charset_for_dump (void (*c_function) (Lisp_Object, Lisp_Object), if (c_function) (*c_function) (arg, range); else - call2 (function, range, arg); + calln (function, range, arg); } break; } @@ -739,7 +739,7 @@ map_charset_chars (void (*c_function)(Lisp_Object, Lisp_Object), Lisp_Object fun if (NILP (function)) (*c_function) (arg, range); else - call2 (function, range, arg); + calln (function, range, arg); } else if (CHARSET_METHOD (charset) == CHARSET_METHOD_MAP) { diff --git a/src/chartab.c b/src/chartab.c index 76a40ca7cc4..dbb6a717213 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -665,7 +665,7 @@ optimize_sub_char_table (Lisp_Object table, Lisp_Object test) if (optimizable && (NILP (test) ? NILP (Fequal (this, elt)) /* defaults to `equal'. */ : EQ (test, Qeq) ? !EQ (this, elt) /* Optimize `eq' case. */ - : NILP (call2 (test, this, elt)))) + : NILP (calln (test, this, elt)))) optimizable = 0; } @@ -806,7 +806,7 @@ map_sub_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object), { if (decoder) val = decoder (top, val); - call2 (function, XCAR (range), val); + calln (function, XCAR (range), val); } } else @@ -817,7 +817,7 @@ map_sub_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object), { if (decoder) val = decoder (top, val); - call2 (function, range, val); + calln (function, range, val); } } } @@ -882,7 +882,7 @@ map_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object), { if (decoder) val = decoder (table, val); - call2 (function, XCAR (range), val); + calln (function, XCAR (range), val); } } else @@ -893,7 +893,7 @@ map_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object), { if (decoder) val = decoder (table, val); - call2 (function, range, val); + calln (function, range, val); } } } @@ -941,7 +941,7 @@ map_sub_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Object), if (c_function) (*c_function) (arg, range); else - call2 (function, range, arg); + calln (function, range, arg); } XSETCAR (range, Qnil); } @@ -964,7 +964,7 @@ map_sub_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Object), if (c_function) (*c_function) (arg, range); else - call2 (function, range, arg); + calln (function, range, arg); XSETCAR (range, Qnil); } } @@ -1025,7 +1025,7 @@ map_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Object), if (c_function) (*c_function) (arg, range); else - call2 (function, range, arg); + calln (function, range, arg); } XSETCAR (range, Qnil); } @@ -1036,7 +1036,7 @@ map_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Object), if (c_function) (*c_function) (arg, range); else - call2 (function, range, arg); + calln (function, range, arg); } } diff --git a/src/cmds.c b/src/cmds.c index 8e99db839b6..7179822c21c 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -255,7 +255,7 @@ because it respects values of `delete-active-region' and `overwrite-mode'. */) } else { - call1 (Qkill_forward_chars, n); + calln (Qkill_forward_chars, n); } return Qnil; } diff --git a/src/coding.c b/src/coding.c index 84cf5c8f34d..6875d4af823 100644 --- a/src/coding.c +++ b/src/coding.c @@ -8034,7 +8034,7 @@ decode_coding_gap (struct coding_system *coding, ptrdiff_t bytes) Fcons (undo_list, Fcurrent_buffer ())); bset_undo_list (current_buffer, Qt); TEMP_SET_PT_BOTH (coding->dst_pos, coding->dst_pos_byte); - val = call1 (CODING_ATTR_POST_READ (attrs), + val = calln (CODING_ATTR_POST_READ (attrs), make_fixnum (coding->produced_char)); CHECK_FIXNAT (val); coding->produced_char += Z - prev_Z; @@ -10871,10 +10871,10 @@ usage: (find-operation-coding-system OPERATION ARGUMENTS...) */) return Fcons (val, val); if (! NILP (Ffboundp (val))) { - /* We use call1 rather than safe_call1 + /* We use calln rather than safe_calln so as to get bug reports about functions called here which don't handle the current interface. */ - val = call1 (val, Flist (nargs, args)); + val = calln (val, Flist (nargs, args)); if (CONSP (val)) return val; if (SYMBOLP (val) && ! NILP (Fcoding_system_p (val))) diff --git a/src/composite.c b/src/composite.c index 373db2813a4..f857dbf77ee 100644 --- a/src/composite.c +++ b/src/composite.c @@ -475,7 +475,7 @@ run_composition_function (ptrdiff_t from, ptrdiff_t to, Lisp_Object prop) && !composition_valid_p (start, end, prop)) to = end; if (!NILP (Ffboundp (func))) - call2 (func, make_fixnum (from), make_fixnum (to)); + calln (func, make_fixnum (from), make_fixnum (to)); } /* Make invalid compositions adjacent to or inside FROM and TO valid. diff --git a/src/data.c b/src/data.c index be85f817014..8236721961f 100644 --- a/src/data.c +++ b/src/data.c @@ -982,7 +982,7 @@ defalias (Lisp_Object symbol, Lisp_Object definition) { /* Handle automatic advice activation. */ Lisp_Object hook = Fget (symbol, Qdefalias_fset_function); if (!NILP (hook)) - call2 (hook, symbol, definition); + calln (hook, symbol, definition); else Ffset (symbol, definition); } @@ -1203,7 +1203,7 @@ Value, if non-nil, is a list (interactive SPEC). */) if (genfun /* Avoid burping during bootstrap. */ && !NILP (Fsymbol_function (Qoclosure_interactive_form))) - return call1 (Qoclosure_interactive_form, fun); + return calln (Qoclosure_interactive_form, fun); else return Qnil; } @@ -1481,7 +1481,7 @@ store_symval_forwarding (lispfwd valcontents, Lisp_Object newval, } else if (FUNCTIONP (predicate)) { - if (NILP (call1 (predicate, newval))) + if (NILP (calln (predicate, newval))) wrong_type_argument (predicate, newval); } } diff --git a/src/dbusbind.c b/src/dbusbind.c index 7c8388cca61..b590a40c4a9 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -1478,7 +1478,7 @@ usage: (dbus-message-internal &rest REST) */) bus or an unknown name, we regard it as broadcast message due to backward compatibility. */ if (dbus_bus_name_has_owner (connection, SSDATA (service), NULL)) - uname = call2 (Qdbus_get_name_owner, bus, service); + uname = calln (Qdbus_get_name_owner, bus, service); else uname = Qnil; diff --git a/src/dired.c b/src/dired.c index 0eebdc62060..4578c1f907c 100644 --- a/src/dired.c +++ b/src/dired.c @@ -397,7 +397,7 @@ If COUNT is non-nil and a natural number, the function will return call the corresponding file name handler. */ Lisp_Object handler = Ffind_file_name_handler (directory, Qdirectory_files); if (!NILP (handler)) - return call6 (handler, Qdirectory_files, directory, + return calln (handler, Qdirectory_files, directory, full, match, nosort, count); return directory_files_internal (directory, full, match, nosort, @@ -437,7 +437,7 @@ which see. */) Lisp_Object handler = Ffind_file_name_handler (directory, Qdirectory_files_and_attributes); if (!NILP (handler)) - return call7 (handler, Qdirectory_files_and_attributes, + return calln (handler, Qdirectory_files_and_attributes, directory, full, match, nosort, id_format, count); return directory_files_internal (directory, full, match, nosort, @@ -470,13 +470,13 @@ the variable `completion-ignored-extensions', which see. */) call the corresponding file name handler. */ handler = Ffind_file_name_handler (directory, Qfile_name_completion); if (!NILP (handler)) - return call4 (handler, Qfile_name_completion, file, directory, predicate); + return calln (handler, Qfile_name_completion, file, directory, predicate); /* If the file name has special constructs in it, call the corresponding file name handler. */ handler = Ffind_file_name_handler (file, Qfile_name_completion); if (!NILP (handler)) - return call4 (handler, Qfile_name_completion, file, directory, predicate); + return calln (handler, Qfile_name_completion, file, directory, predicate); return file_name_completion (file, directory, 0, predicate); } @@ -494,13 +494,13 @@ These are all file names in directory DIRECTORY which begin with FILE. */) call the corresponding file name handler. */ handler = Ffind_file_name_handler (directory, Qfile_name_all_completions); if (!NILP (handler)) - return call3 (handler, Qfile_name_all_completions, file, directory); + return calln (handler, Qfile_name_all_completions, file, directory); /* If the file name has special constructs in it, call the corresponding file name handler. */ handler = Ffind_file_name_handler (file, Qfile_name_all_completions); if (!NILP (handler)) - return call3 (handler, Qfile_name_all_completions, file, directory); + return calln (handler, Qfile_name_all_completions, file, directory); return file_name_completion (file, directory, 1, Qnil); } @@ -609,7 +609,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, bool all_flag, name = Ffile_name_as_directory (name); /* Test the predicate, if any. */ - if (!NILP (predicate) && NILP (call1 (predicate, name))) + if (!NILP (predicate) && NILP (calln (predicate, name))) continue; /* Reject entries where the encoded strings match, but the @@ -856,9 +856,9 @@ so last access time will always be midnight of that day. */) compatibility with old file name handlers which do not implement the new arg. --Stef */ if (NILP (id_format)) - return call2 (handler, Qfile_attributes, filename); + return calln (handler, Qfile_attributes, filename); else - return call3 (handler, Qfile_attributes, filename, id_format); + return calln (handler, Qfile_attributes, filename, id_format); } encoded = ENCODE_FILE (filename); diff --git a/src/doc.c b/src/doc.c index 04afe50d3dd..1c5906de9dc 100644 --- a/src/doc.c +++ b/src/doc.c @@ -358,7 +358,7 @@ string is passed through `substitute-command-keys'. */) xsignal1 (Qvoid_function, function); if (CONSP (fun) && EQ (XCAR (fun), Qmacro)) fun = XCDR (fun); - doc = call1 (Qfunction_documentation, fun); + doc = calln (Qfunction_documentation, fun); /* If DOC is 0, it's typically because of a dumped file missing from the DOC file (bug in src/Makefile.in). */ @@ -383,7 +383,7 @@ string is passed through `substitute-command-keys'. */) } if (NILP (raw)) - doc = call1 (Qsubstitute_command_keys, doc); + doc = calln (Qsubstitute_command_keys, doc); return doc; } @@ -459,7 +459,7 @@ aren't strings. */) tem = Feval (tem, Qnil); if (NILP (raw) && STRINGP (tem)) - tem = call1 (Qsubstitute_command_keys, tem); + tem = calln (Qsubstitute_command_keys, tem); return tem; } diff --git a/src/emacs.c b/src/emacs.c index 896f219baab..596dd117a76 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -556,7 +556,7 @@ init_cmdargs (int argc, char **argv, int skip_args, char const *original_pwd) if (NILP (Vpurify_flag)) { if (!NILP (Ffboundp (Qfile_truename))) - dir = call1 (Qfile_truename, dir); + dir = calln (Qfile_truename, dir); } dir = Fexpand_file_name (build_string ("../.."), dir); } @@ -2995,7 +2995,7 @@ killed. */ if (noninteractive) safe_run_hooks (Qkill_emacs_hook); else - call1 (Qrun_hook_query_error_with_timeout, Qkill_emacs_hook); + calln (Qrun_hook_query_error_with_timeout, Qkill_emacs_hook); } #ifdef HAVE_X_WINDOWS diff --git a/src/eval.c b/src/eval.c index 941d121c2fb..cf05d3baea4 100644 --- a/src/eval.c +++ b/src/eval.c @@ -613,7 +613,7 @@ usage: (function ARG) */) return Fmake_interpreted_closure (args, cdr, Vinternal_interpreter_environment, docstring, iform); else - return call5 (Vinternal_make_interpreted_closure_function, + return calln (Vinternal_make_interpreted_closure_function, args, cdr, Vinternal_interpreter_environment, docstring, iform); } @@ -690,7 +690,7 @@ signal a `cyclic-variable-indirection' error. */) " to `%s'"); formatted = CALLN (Fformat_message, message, new_alias, base_variable); - call2 (Qdisplay_warning, + calln (Qdisplay_warning, list3 (Qdefvaralias, Qlosing_value, new_alias), formatted); } @@ -1860,7 +1860,7 @@ signal_or_quit (Lisp_Object error_symbol, Lisp_Object data, bool continuable) /* FIXME: 'handler-bind' makes `signal-hook-function' obsolete? */ /* FIXME: Here we still "split" the error object into its error-symbol and its error-data? */ - call2 (Vsignal_hook_function, error_symbol, data); + calln (Vsignal_hook_function, error_symbol, data); unbind_to (count, Qnil); } @@ -1900,7 +1900,7 @@ signal_or_quit (Lisp_Object error_symbol, Lisp_Object data, bool continuable) max_ensure_room (20); push_handler (make_fixnum (skip + h->bytecode_dest), SKIP_CONDITIONS); - call1 (h->val, error); + calln (h->val, error); unbind_to (count, Qnil); pop_handler (); } @@ -2284,7 +2284,7 @@ then strings and vectors are not accepted. */) a type-specific interactive-form. */ if (genfun) { - Lisp_Object iform = call1 (Qinteractive_form, fun); + Lisp_Object iform = calln (Qinteractive_form, fun); return NILP (iform) ? Qnil : Qt; } else @@ -3890,11 +3890,11 @@ backtrace_frame_apply (Lisp_Object function, union specbinding *pdl) flags = list2 (QCdebug_on_exit, Qt); if (backtrace_nargs (pdl) == UNEVALLED) - return call4 (function, Qnil, backtrace_function (pdl), *backtrace_args (pdl), flags); + return calln (function, Qnil, backtrace_function (pdl), *backtrace_args (pdl), flags); else { Lisp_Object tem = Flist (backtrace_nargs (pdl), backtrace_args (pdl)); - return call4 (function, Qt, backtrace_function (pdl), tem, flags); + return calln (function, Qt, backtrace_function (pdl), tem, flags); } } diff --git a/src/fileio.c b/src/fileio.c index 9ab17497395..d832967bb6b 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -446,7 +446,7 @@ Given a Unix syntax file name, returns a string ending in slash. */) handler = Ffind_file_name_handler (filename, Qfile_name_directory); if (!NILP (handler)) { - Lisp_Object handled_name = call2 (handler, Qfile_name_directory, + Lisp_Object handled_name = calln (handler, Qfile_name_directory, filename); return STRINGP (handled_name) ? handled_name : Qnil; } @@ -550,7 +550,7 @@ or the entire name if it contains no slash. */) handler = Ffind_file_name_handler (filename, Qfile_name_nondirectory); if (!NILP (handler)) { - Lisp_Object handled_name = call2 (handler, Qfile_name_nondirectory, + Lisp_Object handled_name = calln (handler, Qfile_name_nondirectory, filename); if (STRINGP (handled_name)) return handled_name; @@ -593,7 +593,7 @@ get a current directory to run processes in. */) handler = Ffind_file_name_handler (filename, Qunhandled_file_name_directory); if (!NILP (handler)) { - Lisp_Object handled_name = call2 (handler, Qunhandled_file_name_directory, + Lisp_Object handled_name = calln (handler, Qunhandled_file_name_directory, filename); return STRINGP (handled_name) ? handled_name : Qnil; } @@ -655,7 +655,7 @@ is already present. */) handler = Ffind_file_name_handler (file, Qfile_name_as_directory); if (!NILP (handler)) { - Lisp_Object handled_name = call2 (handler, Qfile_name_as_directory, + Lisp_Object handled_name = calln (handler, Qfile_name_as_directory, file); if (STRINGP (handled_name)) return handled_name; @@ -746,7 +746,7 @@ In Unix-syntax, this function just removes the final slash. */) handler = Ffind_file_name_handler (directory, Qdirectory_file_name); if (!NILP (handler)) { - Lisp_Object handled_name = call2 (handler, Qdirectory_file_name, + Lisp_Object handled_name = calln (handler, Qdirectory_file_name, directory); if (STRINGP (handled_name)) return handled_name; @@ -1048,7 +1048,7 @@ the root directory. */) handler = Ffind_file_name_handler (name, Qexpand_file_name); if (!NILP (handler)) { - handled_name = call3 (handler, Qexpand_file_name, + handled_name = calln (handler, Qexpand_file_name, name, default_directory); if (STRINGP (handled_name)) return handled_name; @@ -1110,7 +1110,7 @@ the root directory. */) handler = Ffind_file_name_handler (default_directory, Qexpand_file_name); if (!NILP (handler)) { - handled_name = call3 (handler, Qexpand_file_name, + handled_name = calln (handler, Qexpand_file_name, name, default_directory); if (STRINGP (handled_name)) return handled_name; @@ -1165,7 +1165,7 @@ the root directory. */) Qexpand_file_name); if (!NILP (handler)) { - handled_name = call3 (handler, Qexpand_file_name, + handled_name = calln (handler, Qexpand_file_name, name, default_directory); if (STRINGP (handled_name)) return handled_name; @@ -1747,7 +1747,7 @@ the root directory. */) handler = Ffind_file_name_handler (result, Qexpand_file_name); if (!NILP (handler)) { - handled_name = call3 (handler, Qexpand_file_name, + handled_name = calln (handler, Qexpand_file_name, result, default_directory); if (! STRINGP (handled_name)) error ("Invalid handler in `file-name-handler-alist'"); @@ -2068,7 +2068,7 @@ those `/' is discarded. */) handler = Ffind_file_name_handler (filename, Qsubstitute_in_file_name); if (!NILP (handler)) { - Lisp_Object handled_name = call2 (handler, Qsubstitute_in_file_name, + Lisp_Object handled_name = calln (handler, Qsubstitute_in_file_name, filename); if (STRINGP (handled_name)) return handled_name; @@ -2108,7 +2108,7 @@ those `/' is discarded. */) Lisp_Object name = (!substituted ? filename : make_specified_string (nm, -1, endp - nm, multibyte)); - Lisp_Object tmp = call1 (Qsubstitute_env_in_file_name, name); + Lisp_Object tmp = calln (Qsubstitute_env_in_file_name, name); CHECK_STRING (tmp); if (!EQ (tmp, name)) substituted = true; @@ -2205,7 +2205,7 @@ barf_or_query_if_file_exists (Lisp_Object absname, bool known_to_exist, AUTO_STRING (format, "File %s already exists; %s anyway? "); tem = CALLN (Fformat, format, absname, build_string (querystring)); if (quick) - tem = call1 (Qy_or_n_p, tem); + tem = calln (Qy_or_n_p, tem); else tem = do_yes_or_no_p (tem); if (NILP (tem)) @@ -2288,7 +2288,7 @@ permissions. */) if (NILP (handler)) handler = Ffind_file_name_handler (newname, Qcopy_file); if (!NILP (handler)) - return call7 (handler, Qcopy_file, file, newname, + return calln (handler, Qcopy_file, file, newname, ok_if_already_exists, keep_time, preserve_uid_gid, preserve_permissions); @@ -2697,7 +2697,7 @@ is case-insensitive. */) call the corresponding file name handler. */ handler = Ffind_file_name_handler (filename, Qfile_name_case_insensitive_p); if (!NILP (handler)) - return call2 (handler, Qfile_name_case_insensitive_p, filename); + return calln (handler, Qfile_name_case_insensitive_p, filename); /* If the file doesn't exist or there is trouble checking its filesystem, move up the filesystem tree until we reach an @@ -2758,7 +2758,7 @@ This is what happens in interactive use with M-x. */) if (NILP (handler)) handler = Ffind_file_name_handler (newname, Qrename_file); if (!NILP (handler)) - return call4 (handler, Qrename_file, + return calln (handler, Qrename_file, file, newname, ok_if_already_exists); encoded_file = ENCODE_FILE (file); @@ -2819,7 +2819,7 @@ This is what happens in interactive use with M-x. */) dirp = S_ISDIR (file_st.st_mode) != 0; } if (dirp) - call4 (Qcopy_directory, file, newname, Qt, Qnil); + calln (Qcopy_directory, file, newname, Qt, Qnil); else if (S_ISREG (file_st.st_mode)) Fcopy_file (file, newname, ok_if_already_exists, Qt, Qt, Qt); else if (S_ISLNK (file_st.st_mode)) @@ -2837,9 +2837,9 @@ This is what happens in interactive use with M-x. */) specpdl_ref count = SPECPDL_INDEX (); specbind (Qdelete_by_moving_to_trash, Qnil); if (dirp) - call2 (Qdelete_directory, file, Qt); + calln (Qdelete_directory, file, Qt); else - call2 (Qdelete_file, file, Qnil); + calln (Qdelete_file, file, Qnil); return unbind_to (count, Qnil); } @@ -2865,14 +2865,14 @@ This is what happens in interactive use with M-x. */) call the corresponding file name handler. */ handler = Ffind_file_name_handler (file, Qadd_name_to_file); if (!NILP (handler)) - return call4 (handler, Qadd_name_to_file, file, + return calln (handler, Qadd_name_to_file, file, newname, ok_if_already_exists); /* If the new name has special constructs in it, call the corresponding file name handler. */ handler = Ffind_file_name_handler (newname, Qadd_name_to_file); if (!NILP (handler)) - return call4 (handler, Qadd_name_to_file, file, + return calln (handler, Qadd_name_to_file, file, newname, ok_if_already_exists); encoded_file = ENCODE_FILE (file); @@ -2929,7 +2929,7 @@ This happens for interactive use with M-x. */) call the corresponding file name handler. */ handler = Ffind_file_name_handler (linkname, Qmake_symbolic_link); if (!NILP (handler)) - return call4 (handler, Qmake_symbolic_link, target, + return calln (handler, Qmake_symbolic_link, target, linkname, ok_if_already_exists); encoded_target = ENCODE_FILE (target); @@ -2990,7 +2990,7 @@ check_file_access (Lisp_Object file, Lisp_Object operation, int amode) Lisp_Object handler = Ffind_file_name_handler (file, operation); if (!NILP (handler)) { - Lisp_Object ok = call2 (handler, operation, file); + Lisp_Object ok = calln (handler, operation, file); /* This errno value is bogus. Any caller that depends on errno should be rethought anyway, to avoid a race between testing a handled file's accessibility and using the file. */ @@ -3045,7 +3045,7 @@ DEFUN ("file-writable-p", Ffile_writable_p, Sfile_writable_p, 1, 1, 0, call the corresponding file name handler. */ handler = Ffind_file_name_handler (absname, Qfile_writable_p); if (!NILP (handler)) - return call2 (handler, Qfile_writable_p, absname); + return calln (handler, Qfile_writable_p, absname); encoded = ENCODE_FILE (absname); if (file_access_p (SSDATA (encoded), W_OK)) @@ -3087,7 +3087,7 @@ If there is no error, returns nil. */) call the corresponding file name handler. */ handler = Ffind_file_name_handler (absname, Qaccess_file); if (!NILP (handler)) - return call3 (handler, Qaccess_file, absname, string); + return calln (handler, Qaccess_file, absname, string); encoded_filename = ENCODE_FILE (absname); @@ -3172,7 +3172,7 @@ This function does not check whether the link target exists. */) call the corresponding file name handler. */ handler = Ffind_file_name_handler (filename, Qfile_symlink_p); if (!NILP (handler)) - return call2 (handler, Qfile_symlink_p, filename); + return calln (handler, Qfile_symlink_p, filename); return emacs_readlinkat (AT_FDCWD, SSDATA (ENCODE_FILE (filename))); } @@ -3196,7 +3196,7 @@ See `file-symlink-p' to distinguish symlinks. */) call the corresponding file name handler. */ Lisp_Object handler = Ffind_file_name_handler (absname, Qfile_directory_p); if (!NILP (handler)) - return call2 (handler, Qfile_directory_p, absname); + return calln (handler, Qfile_directory_p, absname); return file_directory_p (ENCODE_FILE (absname)) ? Qt : Qnil; } @@ -3273,7 +3273,7 @@ predicate must return true. */) handler = Ffind_file_name_handler (absname, Qfile_accessible_directory_p); if (!NILP (handler)) { - Lisp_Object r = call2 (handler, Qfile_accessible_directory_p, absname); + Lisp_Object r = calln (handler, Qfile_accessible_directory_p, absname); /* Set errno in case the handler failed. EACCES might be a lie (e.g., the directory might not exist, or be a regular file), @@ -3367,7 +3367,7 @@ See `file-symlink-p' to distinguish symlinks. */) call the corresponding file name handler. */ Lisp_Object handler = Ffind_file_name_handler (absname, Qfile_regular_p); if (!NILP (handler)) - return call2 (handler, Qfile_regular_p, absname); + return calln (handler, Qfile_regular_p, absname); #ifdef WINDOWSNT /* Tell stat to use expensive method to get accurate info. */ @@ -3406,7 +3406,7 @@ or if SELinux is disabled, or if Emacs lacks SELinux support. */) Lisp_Object handler = Ffind_file_name_handler (absname, Qfile_selinux_context); if (!NILP (handler)) - return call2 (handler, Qfile_selinux_context, absname); + return calln (handler, Qfile_selinux_context, absname); #ifdef HAVE_LIBSELINUX file = SSDATA (ENCODE_FILE (absname)); @@ -3471,7 +3471,7 @@ or if Emacs was not compiled with SELinux support. */) call the corresponding file name handler. */ handler = Ffind_file_name_handler (absname, Qset_file_selinux_context); if (!NILP (handler)) - return call3 (handler, Qset_file_selinux_context, absname, context); + return calln (handler, Qset_file_selinux_context, absname, context); #if HAVE_LIBSELINUX encoded_absname = ENCODE_FILE (absname); @@ -3542,7 +3542,7 @@ Return nil if file does not exist. */) call the corresponding file name handler. */ Lisp_Object handler = Ffind_file_name_handler (absname, Qfile_acl); if (!NILP (handler)) - return call2 (handler, Qfile_acl, absname); + return calln (handler, Qfile_acl, absname); # ifdef HAVE_ACL_SET_FILE # ifndef HAVE_ACL_TYPE_EXTENDED @@ -3599,7 +3599,7 @@ support. */) call the corresponding file name handler. */ handler = Ffind_file_name_handler (absname, Qset_file_acl); if (!NILP (handler)) - return call3 (handler, Qset_file_acl, absname, acl_string); + return calln (handler, Qset_file_acl, absname, acl_string); # ifdef HAVE_ACL_SET_FILE if (STRINGP (acl_string)) @@ -3650,7 +3650,7 @@ do not follow FILENAME if it is a symbolic link. */) call the corresponding file name handler. */ Lisp_Object handler = Ffind_file_name_handler (absname, Qfile_modes); if (!NILP (handler)) - return call3 (handler, Qfile_modes, absname, flag); + return calln (handler, Qfile_modes, absname, flag); char *fname = SSDATA (ENCODE_FILE (absname)); if (emacs_fstatat (AT_FDCWD, fname, &st, nofollow) != 0) @@ -3681,7 +3681,7 @@ command from GNU Coreutils. */) call the corresponding file name handler. */ Lisp_Object handler = Ffind_file_name_handler (absname, Qset_file_modes); if (!NILP (handler)) - return call4 (handler, Qset_file_modes, absname, mode, flag); + return calln (handler, Qset_file_modes, absname, mode, flag); encoded = ENCODE_FILE (absname); char *fname = SSDATA (encoded); @@ -3755,7 +3755,7 @@ TIMESTAMP is in the format of `current-time'. */) absname = Fexpand_file_name (filename, BVAR (current_buffer, directory)), handler = Ffind_file_name_handler (absname, Qset_file_times); if (!NILP (handler)) - return call4 (handler, Qset_file_times, absname, timestamp, flag); + return calln (handler, Qset_file_times, absname, timestamp, flag); Lisp_Object encoded_absname = ENCODE_FILE (absname); check_vfs_filename (encoded_absname, "Trying to set access times of" @@ -3808,7 +3808,7 @@ For existing files, this compares their last-modified times. */) if (NILP (handler)) handler = Ffind_file_name_handler (absname2, Qfile_newer_than_file_p); if (!NILP (handler)) - return call3 (handler, Qfile_newer_than_file_p, absname1, absname2); + return calln (handler, Qfile_newer_than_file_p, absname1, absname2); encoded = ENCODE_FILE (absname1); @@ -3971,7 +3971,7 @@ get_window_points_and_markers (void) { Lisp_Object pt_marker = Fpoint_marker (); Lisp_Object windows - = call3 (Qget_buffer_window_list, Fcurrent_buffer (), Qnil, Qt); + = calln (Qget_buffer_window_list, Fcurrent_buffer (), Qnil, Qt); Lisp_Object window_markers = windows; /* Window markers (and point) are handled specially: rather than move to just before or just after the modified text, we try to keep the @@ -4130,7 +4130,7 @@ by calling `format-decode', which see. */) handler = Ffind_file_name_handler (filename, Qinsert_file_contents); if (!NILP (handler)) { - val = call6 (handler, Qinsert_file_contents, filename, + val = calln (handler, Qinsert_file_contents, filename, visit, beg, end, replace); if (CONSP (val) && CONSP (XCDR (val)) && RANGED_FIXNUMP (0, XCAR (XCDR (val)), ZV - PT)) @@ -4333,7 +4333,7 @@ by calling `format-decode', which see. */) insert_1_both ((char *) read_buf, nread, nread, 0, 0, 0); TEMP_SET_PT_BOTH (BEG, BEG_BYTE); - coding_system = call2 (Vset_auto_coding_function, + coding_system = calln (Vset_auto_coding_function, filename, make_fixnum (nread)); set_buffer_internal (prev); @@ -4916,7 +4916,7 @@ by calling `format-decode', which see. */) if (inserted > 0 && ! NILP (Vset_auto_coding_function)) { - coding_system = call2 (Vset_auto_coding_function, + coding_system = calln (Vset_auto_coding_function, filename, make_fixnum (inserted)); } @@ -5047,7 +5047,7 @@ by calling `format-decode', which see. */) if (! NILP (Ffboundp (Qafter_insert_file_set_coding))) { - insval = call2 (Qafter_insert_file_set_coding, make_fixnum (inserted), + insval = calln (Qafter_insert_file_set_coding, make_fixnum (inserted), visit); if (! NILP (insval)) { @@ -5074,7 +5074,7 @@ by calling `format-decode', which see. */) if (NILP (replace)) { - insval = call3 (Qformat_decode, + insval = calln (Qformat_decode, Qnil, make_fixnum (inserted), visit); if (! RANGED_FIXNUMP (0, insval, ZV - PT)) wrong_type_argument (Qinserted_chars, insval); @@ -5097,7 +5097,7 @@ by calling `format-decode', which see. */) modiff_count ochars_modiff = CHARS_MODIFF; TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE); - insval = call3 (Qformat_decode, + insval = calln (Qformat_decode, Qnil, make_fixnum (oinserted), visit); if (! RANGED_FIXNUMP (0, insval, ZV - PT)) wrong_type_argument (Qinserted_chars, insval); @@ -5119,7 +5119,7 @@ by calling `format-decode', which see. */) { if (NILP (replace)) { - insval = call1 (XCAR (p), make_fixnum (inserted)); + insval = calln (XCAR (p), make_fixnum (inserted)); if (!NILP (insval)) { if (! RANGED_FIXNUMP (0, insval, ZV - PT)) @@ -5137,7 +5137,7 @@ by calling `format-decode', which see. */) modiff_count ochars_modiff = CHARS_MODIFF; TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE); - insval = call1 (XCAR (p), make_fixnum (oinserted)); + insval = calln (XCAR (p), make_fixnum (oinserted)); if (!NILP (insval)) { if (! RANGED_FIXNUMP (0, insval, ZV - PT)) @@ -5239,7 +5239,7 @@ choose_write_coding_system (Lisp_Object start, Lisp_Object end, Lisp_Object file if (coding_system_require_warning && !NILP (Ffboundp (Vselect_safe_coding_system_function))) /* Confirm that VAL can surely encode the current region. */ - val = call5 (Vselect_safe_coding_system_function, + val = calln (Vselect_safe_coding_system_function, start, end, list2 (Qt, val), Qnil, filename); } @@ -5299,7 +5299,7 @@ choose_write_coding_system (Lisp_Object start, Lisp_Object end, Lisp_Object file && !NILP (Ffboundp (Vselect_safe_coding_system_function))) { /* Confirm that VAL can surely encode the current region. */ - val = call5 (Vselect_safe_coding_system_function, + val = calln (Vselect_safe_coding_system_function, start, end, val, Qnil, filename); /* As the function specified by select-safe-coding-system-function is out of our control, make sure we are not fed by bogus @@ -5440,7 +5440,7 @@ write_region (Lisp_Object start, Lisp_Object end, Lisp_Object filename, if (!NILP (handler)) { Lisp_Object val; - val = call8 (handler, Qwrite_region, start, end, + val = calln (handler, Qwrite_region, start, end, filename, append, visit, lockname, mustbenew); if (visiting) @@ -5784,7 +5784,7 @@ build_annotations (Lisp_Object start, Lisp_Object end) goto loop_over_p; } Vwrite_region_annotations_so_far = annotations; - res = call2 (XCAR (p), start, end); + res = calln (XCAR (p), start, end); /* If the function makes a different buffer current, assume that means this buffer contains altered text to be output. Reset START and END from the buffer bounds @@ -5818,7 +5818,7 @@ build_annotations (Lisp_Object start, Lisp_Object end) /* Value is either a list of annotations or nil if the function has written annotations to a temporary buffer, which is now current. */ - res = call5 (Qformat_annotate_function, XCAR (p), start, end, + res = calln (Qformat_annotate_function, XCAR (p), start, end, original_buffer, make_fixnum (i++)); if (current_buffer != given_buffer) { @@ -6014,7 +6014,7 @@ See Info node `(elisp)Modification Time' for more details. */) handler = Ffind_file_name_handler (BVAR (b, filename), Qverify_visited_file_modtime); if (!NILP (handler)) - return call2 (handler, Qverify_visited_file_modtime, buf); + return calln (handler, Qverify_visited_file_modtime, buf); filename = ENCODE_FILE (BVAR (b, filename)); mtime = (emacs_fstatat (AT_FDCWD, SSDATA (filename), &st, 0) == 0 @@ -6087,7 +6087,7 @@ in `current-time' or an integer flag as returned by `visited-file-modtime'. */) handler = Ffind_file_name_handler (filename, Qset_visited_file_modtime); if (!NILP (handler)) /* The handler can find the file name the same way we did. */ - return call2 (handler, Qset_visited_file_modtime, Qnil); + return calln (handler, Qset_visited_file_modtime, Qnil); encoded = ENCODE_FILE (filename); @@ -6114,8 +6114,7 @@ auto_save_error (Lisp_Object error_val) AUTO_STRING (format, "Auto-saving %s: %s"); Lisp_Object msg = CALLN (Fformat, format, BVAR (current_buffer, name), Ferror_message_string (error_val)); - call3 (Qdisplay_warning, - Qauto_save, msg, QCerror); + calln (Qdisplay_warning, Qauto_save, msg, QCerror); return Qnil; } @@ -6175,7 +6174,7 @@ do_auto_save_make_dir (Lisp_Object dir) Lisp_Object result; auto_saving_dir_umask = 077; - result = call2 (Qmake_directory, dir, Qt); + result = calln (Qmake_directory, dir, Qt); auto_saving_dir_umask = 0; return result; } @@ -6526,7 +6525,7 @@ If the underlying system call fails, value is nil. */) Lisp_Object handler = Ffind_file_name_handler (filename, Qfile_system_info); if (!NILP (handler)) { - Lisp_Object result = call2 (handler, Qfile_system_info, filename); + Lisp_Object result = calln (handler, Qfile_system_info, filename); if (CONSP (result) || NILP (result)) return result; error ("Invalid handler in `file-name-handler-alist'"); diff --git a/src/filelock.c b/src/filelock.c index c276f19dcd1..e61c6776e3e 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -555,7 +555,7 @@ make_lock_file_name (Lisp_Object fn) return Qnil; #endif /* defined HAVE_ANDROID && !defined ANDROID_STUBIFY */ - lock_file_name = call1 (Qmake_lock_file_name, fn); + lock_file_name = calln (Qmake_lock_file_name, fn); return !NILP (lock_file_name) ? ENCODE_FILE (lock_file_name) : Qnil; } @@ -605,7 +605,7 @@ lock_file (Lisp_Object fn) && NILP (Fverify_visited_file_modtime (subject_buf)) && !NILP (Ffile_exists_p (fn)) && !(!NILP (lfname) && current_lock_owner (NULL, lfname) == I_OWN_IT)) - call1 (intern ("userlock--ask-user-about-supersession-threat"), fn); + calln (intern ("userlock--ask-user-about-supersession-threat"), fn); /* Don't do locking if the user has opted out. */ if (!NILP (lfname)) @@ -623,7 +623,7 @@ lock_file (Lisp_Object fn) memmove (dot + replacementlen, dot + 1, pidlen); strcpy (dot + replacementlen + pidlen, ")"); memcpy (dot, replacement, replacementlen); - attack = call2 (intern ("ask-user-about-lock"), fn, + attack = calln (intern ("ask-user-about-lock"), fn, build_string (lock_info.user)); /* Take the lock if the user said so. */ if (!NILP (attack)) @@ -653,7 +653,7 @@ unlock_file (Lisp_Object fn) static Lisp_Object unlock_file_handle_error (Lisp_Object err) { - call1 (intern ("userlock--handle-unlock-error"), err); + calln (intern ("userlock--handle-unlock-error"), err); return Qnil; } @@ -690,7 +690,7 @@ whether to modify FILE. */) Lisp_Object handler; handler = Ffind_file_name_handler (file, Qlock_file); if (!NILP (handler)) - return call2 (handler, Qlock_file, file); + return calln (handler, Qlock_file, file); lock_file (file); #endif /* MSDOS */ @@ -710,7 +710,7 @@ DEFUN ("unlock-file", Funlock_file, Sunlock_file, 1, 1, 0, handler = Ffind_file_name_handler (file, Qunlock_file); if (!NILP (handler)) { - call2 (handler, Qunlock_file, file); + calln (handler, Qunlock_file, file); return Qnil; } @@ -786,7 +786,7 @@ t if it is locked by you, else a string saying which user has locked it. */) handler = Ffind_file_name_handler (filename, Qfile_locked_p); if (!NILP (handler)) { - return call2 (handler, Qfile_locked_p, filename); + return calln (handler, Qfile_locked_p, filename); } Lisp_Object lfname = make_lock_file_name (filename); diff --git a/src/fns.c b/src/fns.c index 11348c12c53..c13a4b7ffbf 100644 --- a/src/fns.c +++ b/src/fns.c @@ -2025,7 +2025,7 @@ TESTFN is called with 2 arguments: a car of an alist element and KEY. */) if ((NILP (testfn) ? (EQ (XCAR (car), key) || !NILP (Fequal (XCAR (car), key))) - : !NILP (call2 (testfn, XCAR (car), key)))) + : !NILP (calln (testfn, XCAR (car), key)))) return car; } CHECK_LIST_END (tail, alist); @@ -2515,7 +2515,7 @@ merge (Lisp_Object org_l1, Lisp_Object org_l2, Lisp_Object pred) } Lisp_Object tem; - if (!NILP (call2 (pred, Fcar (l1), Fcar (l2)))) + if (!NILP (calln (pred, Fcar (l1), Fcar (l2)))) { tem = l1; l1 = Fcdr (l1); @@ -2604,7 +2604,7 @@ This function doesn't signal an error if PLIST is invalid. */) { if (! CONSP (XCDR (tail))) break; - if (!NILP (call2 (predicate, XCAR (tail), prop))) + if (!NILP (calln (predicate, XCAR (tail), prop))) return XCAR (XCDR (tail)); tail = XCDR (tail); } @@ -2663,7 +2663,7 @@ The PLIST is modified by side effects. */) if (! CONSP (XCDR (tail))) break; - if (!NILP (call2 (predicate, XCAR (tail), prop))) + if (!NILP (calln (predicate, XCAR (tail), prop))) { Fsetcar (XCDR (tail), val); return plist; @@ -2738,7 +2738,7 @@ The value is actually the tail of PLIST whose car is PROP. */) Lisp_Object tail = plist; FOR_EACH_TAIL (tail) { - if (!NILP (call2 (predicate, XCAR (tail), prop))) + if (!NILP (calln (predicate, XCAR (tail), prop))) return tail; tail = XCDR (tail); if (! CONSP (tail)) @@ -3383,7 +3383,7 @@ mapcar1 (EMACS_INT leni, Lisp_Object *vals, Lisp_Object fn, Lisp_Object seq) { if (! CONSP (tail)) return i; - Lisp_Object dummy = call1 (fn, XCAR (tail)); + Lisp_Object dummy = calln (fn, XCAR (tail)); if (vals) vals[i] = dummy; tail = XCDR (tail); @@ -3393,7 +3393,7 @@ mapcar1 (EMACS_INT leni, Lisp_Object *vals, Lisp_Object fn, Lisp_Object seq) { for (ptrdiff_t i = 0; i < leni; i++) { - Lisp_Object dummy = call1 (fn, AREF (seq, i)); + Lisp_Object dummy = calln (fn, AREF (seq, i)); if (vals) vals[i] = dummy; } @@ -3406,7 +3406,7 @@ mapcar1 (EMACS_INT leni, Lisp_Object *vals, Lisp_Object fn, Lisp_Object seq) { ptrdiff_t i_before = i; int c = fetch_string_char_advance (seq, &i, &i_byte); - Lisp_Object dummy = call1 (fn, make_fixnum (c)); + Lisp_Object dummy = calln (fn, make_fixnum (c)); if (vals) vals[i_before] = dummy; } @@ -3416,7 +3416,7 @@ mapcar1 (EMACS_INT leni, Lisp_Object *vals, Lisp_Object fn, Lisp_Object seq) eassert (BOOL_VECTOR_P (seq)); for (EMACS_INT i = 0; i < leni; i++) { - Lisp_Object dummy = call1 (fn, bool_vector_ref (seq, i)); + Lisp_Object dummy = calln (fn, bool_vector_ref (seq, i)); if (vals) vals[i] = dummy; } @@ -3549,7 +3549,7 @@ SEQUENCE may be a list, a vector, a bool-vector, or a string. */) Lisp_Object do_yes_or_no_p (Lisp_Object prompt) { - return call1 (Qyes_or_no_p, prompt); + return calln (Qyes_or_no_p, prompt); } DEFUN ("yes-or-no-p", Fyes_or_no_p, Syes_or_no_p, 1, 1, 0, @@ -3594,7 +3594,7 @@ by a mouse, or by some window-system gesture, or via a menu. */) } if (use_short_answers) - return call1 (Qy_or_n_p, prompt); + return calln (Qy_or_n_p, prompt); ptrdiff_t promptlen = SCHARS (prompt); bool prompt_ends_in_nonspace @@ -5986,7 +5986,7 @@ set a new value for KEY, or `remhash' to remove KEY. we shouldn't crash as a result (although the effects are unpredictable). */ DOHASH_SAFE (h, i) - call2 (function, HASH_KEY (h, i), HASH_VALUE (h, i)); + calln (function, HASH_KEY (h, i), HASH_VALUE (h, i)); return Qnil; } @@ -6234,7 +6234,7 @@ extract_data_from_object (Lisp_Object spec, if (!force_raw_text && !NILP (Ffboundp (Vselect_safe_coding_system_function))) /* Confirm that VAL can surely encode the current region. */ - coding_system = call4 (Vselect_safe_coding_system_function, + coding_system = calln (Vselect_safe_coding_system_function, make_fixnum (b), make_fixnum (e), coding_system, Qnil); diff --git a/src/frame.c b/src/frame.c index b2d6877e636..a3d95b75382 100644 --- a/src/frame.c +++ b/src/frame.c @@ -401,7 +401,7 @@ frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal, : FRAME_COLUMN_WIDTH (f))); } else - retval = XFIXNUM (call4 (Qframe_windows_min_size, frame, horizontal, + retval = XFIXNUM (calln (Qframe_windows_min_size, frame, horizontal, ignore, pixelwise)); /* Don't allow too small height of text-mode frames, or else cm.c @@ -890,7 +890,7 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height, #endif } else if (new_text_cols != old_text_cols) - call2 (Qwindow__pixel_to_total, frame, Qt); + calln (Qwindow__pixel_to_total, frame, Qt); if (new_inner_height != old_inner_height /* When the top margin has changed we have to recalculate the top @@ -907,7 +907,7 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height, FrameRows (FRAME_TTY (f)) = new_text_lines + FRAME_TOP_MARGIN (f); } else if (new_text_lines != old_text_lines) - call2 (Qwindow__pixel_to_total, frame, Qnil); + calln (Qwindow__pixel_to_total, frame, Qnil); /* Assign new sizes. */ FRAME_COLS (f) = new_text_cols; @@ -1153,7 +1153,7 @@ make_frame_without_minibuffer (Lisp_Object mini_window, KBOARD *kb, Lisp_Object initial_frame; /* If there's no minibuffer frame to use, create one. */ - initial_frame = call1 (Qmake_initial_minibuffer_frame, + initial_frame = calln (Qmake_initial_minibuffer_frame, display); kset_default_minibuffer_frame (kb, initial_frame); } @@ -1818,7 +1818,7 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor non-active minibuffer. */ && NILP (Fminibufferp (XWINDOW (f->minibuffer_window)->contents, Qt))) { - Lisp_Object w = call1 (Qget_mru_window, frame); + Lisp_Object w = calln (Qget_mru_window, frame); if (WINDOW_LIVE_P (w)) /* W can be nil in minibuffer-only frames. */ Fset_frame_selected_window (frame, w, Qnil); } @@ -2980,7 +2980,7 @@ mouse_position (bool call_mouse_position_function) lispy_dummy = Qnil; retval = Fcons (lispy_dummy, Fcons (x, y)); if (call_mouse_position_function && !NILP (Vmouse_position_function)) - retval = call1 (Vmouse_position_function, retval); + retval = calln (Vmouse_position_function, retval); return retval; } @@ -3022,7 +3022,7 @@ Y. */) retval = Fcons (lispy_dummy, Fcons (x, y)); if (!NILP (Vmouse_position_function)) - retval = call1 (Vmouse_position_function, retval); + retval = calln (Vmouse_position_function, retval); return retval; } @@ -4482,7 +4482,7 @@ frame_float (struct frame *f, Lisp_Object val, enum frame_float_type what, Lisp_Object frame; XSETFRAME (frame, f); - monitor_attributes = call1 (Qframe_monitor_attributes, frame); + monitor_attributes = calln (Qframe_monitor_attributes, frame); if (NILP (monitor_attributes)) { /* No monitor attributes available. */ @@ -4527,7 +4527,7 @@ frame_float (struct frame *f, Lisp_Object val, enum frame_float_type what, Lisp_Object frame, outer_edges; XSETFRAME (frame, f); - outer_edges = call2 (Qframe_edges, frame, Qouter_edges); + outer_edges = calln (Qframe_edges, frame, Qouter_edges); if (!NILP (outer_edges)) { @@ -6127,7 +6127,7 @@ On Nextstep, this just calls `ns-parse-geometry'. */) #ifdef HAVE_NS if (strchr (SSDATA (string), ' ') != NULL) - return call1 (Qns_parse_geometry, string); + return calln (Qns_parse_geometry, string); #endif int geometry = XParseGeometry (SSDATA (string), &x, &y, &width, &height); @@ -6539,7 +6539,7 @@ have changed. */) /* Now call this to apply the existing value(s) of the `default' face. */ - call2 (Qface_set_after_frame_default, frame, params); + calln (Qface_set_after_frame_default, frame, params); /* Restore the value of the `font-parameter' parameter, as `face-set-after-frame-default' will have changed it through its diff --git a/src/gtkutil.c b/src/gtkutil.c index 54d2bc63077..60899bd90e4 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -5505,7 +5505,7 @@ find_rtl_image (struct frame *f, Lisp_Object image, Lisp_Object rtl) Lisp_Object rtl_image = PROP (TOOL_BAR_ITEM_IMAGES); if (!NILP (file = file_for_image (rtl_image))) { - file = call1 (Qfile_name_sans_extension, + file = calln (Qfile_name_sans_extension, Ffile_name_nondirectory (file)); if (! NILP (Fequal (file, rtl_name))) { @@ -5919,7 +5919,7 @@ update_frame_tool_bar (struct frame *f) specified_file = file_for_image (image); if (!NILP (specified_file) && !NILP (Ffboundp (Qx_gtk_map_stock))) - stock = call1 (Qx_gtk_map_stock, specified_file); + stock = calln (Qx_gtk_map_stock, specified_file); if (CONSP (stock)) { diff --git a/src/haikufns.c b/src/haikufns.c index 29e4d6283e1..22e82048fc4 100644 --- a/src/haikufns.c +++ b/src/haikufns.c @@ -1196,7 +1196,7 @@ haiku_create_tip_frame (Lisp_Object parms) { Lisp_Object bg = Fframe_parameter (frame, Qbackground_color); - call2 (Qface_set_after_frame_default, frame, Qnil); + calln (Qface_set_after_frame_default, frame, Qnil); if (!EQ (bg, Fframe_parameter (frame, Qbackground_color))) { @@ -1309,7 +1309,7 @@ haiku_hide_tip (bool delete) if (!NILP (tip_timer)) { - call1 (Qcancel_timer, tip_timer); + calln (Qcancel_timer, tip_timer); tip_timer = Qnil; } @@ -2467,7 +2467,7 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, tip_f = XFRAME (tip_frame); if (!NILP (tip_timer)) { - call1 (Qcancel_timer, tip_timer); + calln (Qcancel_timer, tip_timer); tip_timer = Qnil; } @@ -2505,11 +2505,11 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, } else tip_last_parms = - call2 (Qassq_delete_all, parm, tip_last_parms); + calln (Qassq_delete_all, parm, tip_last_parms); } else tip_last_parms = - call2 (Qassq_delete_all, parm, tip_last_parms); + calln (Qassq_delete_all, parm, tip_last_parms); } /* Now check if every parameter in what is left of @@ -2680,7 +2680,7 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, start_timer: /* Let the tip disappear after timeout seconds. */ - tip_timer = call3 (Qrun_at_time, timeout, Qnil, Qx_hide_tip); + tip_timer = calln (Qrun_at_time, timeout, Qnil, Qx_hide_tip); return unbind_to (count, Qnil); } diff --git a/src/haikumenu.c b/src/haikumenu.c index acee8effe31..a7976cc1bed 100644 --- a/src/haikumenu.c +++ b/src/haikumenu.c @@ -786,7 +786,7 @@ the position of the last non-menu event instead. */) popup_activated_p += 1; } else - return call2 (Qpopup_menu, call0 (Qmouse_menu_bar_map), + return calln (Qpopup_menu, calln (Qmouse_menu_bar_map), last_nonmenu_event); return Qnil; diff --git a/src/image.c b/src/image.c index bae7c13ac82..b8405d81111 100644 --- a/src/image.c +++ b/src/image.c @@ -12660,7 +12660,7 @@ gs_load (struct frame *f, struct image *img) if (NILP (loader)) loader = Qgs_load_image; - img->lisp_data = call6 (loader, frame, img->spec, + img->lisp_data = calln (loader, frame, img->spec, make_fixnum (img->width), make_fixnum (img->height), window_and_pixmap_id, diff --git a/src/insdel.c b/src/insdel.c index 27d0d5d628c..57e98018872 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -2067,7 +2067,7 @@ prepare_to_modify_buffer_1 (ptrdiff_t start, ptrdiff_t end, : (!NILP (Vselect_active_regions) && !NILP (Vtransient_mark_mode)))) Vsaved_region_selection - = call1 (Vregion_extract_function, Qnil); + = calln (Vregion_extract_function, Qnil); signal_before_change (start, end, preserve_ptr); Fset (Qdeactivate_mark, Qt); diff --git a/src/intervals.c b/src/intervals.c index e81fa9e3a2c..b937c947ab0 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -2052,17 +2052,17 @@ set_point_both (ptrdiff_t charpos, ptrdiff_t bytepos) enter_after = Qnil; if (! EQ (leave_before, enter_before) && !NILP (leave_before)) - call2 (leave_before, make_fixnum (old_position), + calln (leave_before, make_fixnum (old_position), make_fixnum (charpos)); if (! EQ (leave_after, enter_after) && !NILP (leave_after)) - call2 (leave_after, make_fixnum (old_position), + calln (leave_after, make_fixnum (old_position), make_fixnum (charpos)); if (! EQ (enter_before, leave_before) && !NILP (enter_before)) - call2 (enter_before, make_fixnum (old_position), + calln (enter_before, make_fixnum (old_position), make_fixnum (charpos)); if (! EQ (enter_after, leave_after) && !NILP (enter_after)) - call2 (enter_after, make_fixnum (old_position), + calln (enter_after, make_fixnum (old_position), make_fixnum (charpos)); } } diff --git a/src/keyboard.c b/src/keyboard.c index 97bdef56c9d..723c51b3ce5 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1039,7 +1039,7 @@ cmd_error_internal (Lisp_Object data, const char *context) /* Use user's specified output function if any. */ if (!NILP (Vcommand_error_function)) - call3 (Vcommand_error_function, data, + calln (Vcommand_error_function, data, context ? build_string (context) : empty_unibyte_string, Vsignaling_function); @@ -1542,7 +1542,7 @@ command_loop_1 (void) update_redisplay_ticks (0, NULL); display_working_on_window_p = false; - call1 (Qcommand_execute, Vthis_command); + calln (Qcommand_execute, Vthis_command); display_working_on_window_p = false; #ifdef HAVE_WINDOW_SYSTEM @@ -1631,11 +1631,11 @@ command_loop_1 (void) Vselection_inhibit_update_commands))) { Lisp_Object txt - = call1 (Vregion_extract_function, Qnil); + = calln (Vregion_extract_function, Qnil); if (XFIXNUM (Flength (txt)) > 0) /* Don't set empty selections. */ - call2 (Qgui_set_selection, QPRIMARY, txt); + calln (Qgui_set_selection, QPRIMARY, txt); CALLN (Frun_hook_with_args, Qpost_select_region_hook, txt); } @@ -2205,7 +2205,7 @@ help_echo_substitute_command_keys (Lisp_Object help) help))) return help; - return call1 (Qsubstitute_command_keys, help); + return calln (Qsubstitute_command_keys, help); } /* Display the help-echo property of the character after the mouse pointer. @@ -2259,7 +2259,7 @@ show_help_echo (Lisp_Object help, Lisp_Object window, Lisp_Object object, restore the mouse_moved flag. */ struct frame *f = some_mouse_moved (); - help = call1 (Qmouse_fixup_help_message, help); + help = calln (Qmouse_fixup_help_message, help); if (f) f->mouse_moved = true; } @@ -2267,7 +2267,7 @@ show_help_echo (Lisp_Object help, Lisp_Object window, Lisp_Object object, if (STRINGP (help) || NILP (help)) { if (!NILP (Vshow_help_function)) - call1 (Vshow_help_function, help_echo_substitute_command_keys (help)); + calln (Vshow_help_function, help_echo_substitute_command_keys (help)); help_echo_showing_p = STRINGP (help); } } @@ -3072,7 +3072,7 @@ read_char (int commandflag, Lisp_Object map, struct buffer *prev_buffer = current_buffer; last_input_event = c; - call4 (Qcommand_execute, tem, Qnil, Fvector (1, &last_input_event), Qt); + calln (Qcommand_execute, tem, Qnil, Fvector (1, &last_input_event), Qt); if (CONSP (c) && !NILP (Fmemq (XCAR (c), Vwhile_no_input_ignore_events)) && !end_time) @@ -3258,7 +3258,7 @@ read_char (int commandflag, Lisp_Object map, } /* Call the input method. */ - tem = call1 (Vinput_method_function, c); + tem = calln (Vinput_method_function, c); tem = unbind_to (count, tem); @@ -4801,7 +4801,7 @@ timer_check_2 (Lisp_Object timers, Lisp_Object idle_timers) specbind (Qinhibit_quit, Qt); - call1 (Qtimer_event_handler, chosen_timer); + calln (Qtimer_event_handler, chosen_timer); Vdeactivate_mark = old_deactivate_mark; timers_run++; unbind_to (count, Qnil); @@ -6511,7 +6511,7 @@ make_lispy_event (struct input_event *event) being generated. */ { Lisp_Object edges - = call4 (Qwindow_edges, Fcar (start_pos), Qt, Qnil, Qt); + = calln (Qwindow_edges, Fcar (start_pos), Qt, Qnil, Qt); int new_x = XFIXNUM (Fcar (frame_relative_event_pos)); int new_y = XFIXNUM (Fcdr (frame_relative_event_pos)); @@ -8902,7 +8902,7 @@ parse_menu_item (Lisp_Object item, int inmenubar) /* The previous code preferred :key-sequence to :keys, so we preserve this behavior. */ if (STRINGP (keyeq) && !CONSP (keyhint)) - keyeq = concat2 (space_space, call1 (Qsubstitute_command_keys, keyeq)); + keyeq = concat2 (space_space, calln (Qsubstitute_command_keys, keyeq)); else { Lisp_Object prefix = keyeq; @@ -10261,7 +10261,7 @@ access_keymap_keyremap (Lisp_Object map, Lisp_Object key, Lisp_Object prompt, remapped. */ count = SPECPDL_INDEX (); specbind (Qcurrent_key_remap_sequence, remap); - next = unbind_to (count, call1 (next, prompt)); + next = unbind_to (count, calln (next, prompt)); /* If the function returned something invalid, barf--don't ignore it. */ diff --git a/src/keymap.c b/src/keymap.c index 9ff0b52df72..99291e72b3f 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -579,7 +579,7 @@ map_keymap_internal (Lisp_Object map, static void map_keymap_call (Lisp_Object key, Lisp_Object val, Lisp_Object fun, void *dummy) { - call2 (fun, key, val); + calln (fun, key, val); } /* Same as map_keymap_internal, but traverses parent keymaps as well. @@ -642,7 +642,7 @@ usage: (map-keymap FUNCTION KEYMAP) */) (Lisp_Object function, Lisp_Object keymap, Lisp_Object sort_first) { if (! NILP (sort_first)) - return call2 (Qmap_keymap_sorted, function, keymap); + return calln (Qmap_keymap_sorted, function, keymap); map_keymap (keymap, map_keymap_call, function, NULL, 1); return Qnil; @@ -1069,9 +1069,9 @@ possibly_translate_key_sequence (Lisp_Object key, ptrdiff_t *length) This happens when menu items define as bindings strings that should be inserted into the buffer, not commands. See bug#64927, for example. */ - if (NILP (call1 (Qkey_valid_p, AREF (key, 0)))) + if (NILP (calln (Qkey_valid_p, AREF (key, 0)))) return key; - key = call1 (Qkey_parse, AREF (key, 0)); + key = calln (Qkey_parse, AREF (key, 0)); *length = CHECK_VECTOR_OR_STRING (key); if (*length == 0) xsignal2 (Qerror, build_string ("Invalid `key-parse' syntax: %S"), key); @@ -3035,14 +3035,14 @@ static void describe_vector_princ (Lisp_Object elt, Lisp_Object fun) { Findent_to (make_fixnum (16), make_fixnum (1)); - call1 (fun, elt); + calln (fun, elt); Fterpri (Qnil, Qnil); } static void describe_vector_basic (Lisp_Object elt, Lisp_Object fun) { - call1 (fun, elt); + calln (fun, elt); } DEFUN ("describe-vector", Fdescribe_vector, Sdescribe_vector, 1, 2, 0, diff --git a/src/lisp.h b/src/lisp.h index bc0bc682498..9038a37e421 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -4850,7 +4850,7 @@ extern bool signal_quit_p (Lisp_Object); The calling convention: if (!NILP (Vrun_hooks)) - call1 (Vrun_hooks, Qmy_funny_hook); + calln (Vrun_hooks, Qmy_funny_hook); should no longer be used. */ extern void run_hook (Lisp_Object); diff --git a/src/lread.c b/src/lread.c index ab900b3bee6..e5d1ba0e6bb 100644 --- a/src/lread.c +++ b/src/lread.c @@ -524,7 +524,7 @@ unreadchar (Lisp_Object readcharfun, int c) unread_char = c; } else - call1 (readcharfun, make_fixnum (c)); + calln (readcharfun, make_fixnum (c)); } static int @@ -1342,7 +1342,7 @@ Return t if the file exists and loads successfully. */) handler = Ffind_file_name_handler (file, Qload); if (!NILP (handler)) return - call6 (handler, Qload, file, noerror, nomessage, nosuffix, must_suffix); + calln (handler, Qload, file, noerror, nomessage, nosuffix, must_suffix); /* The presence of this call is the result of a historical accident: it used to be in every file-operation and when it got removed @@ -1446,7 +1446,7 @@ Return t if the file exists and loads successfully. */) else handler = Ffind_file_name_handler (found, Qload); if (! NILP (handler)) - return call5 (handler, Qload, found, noerror, nomessage, Qt); + return calln (handler, Qload, found, noerror, nomessage, Qt); #ifdef DOS_NT /* Tramp has to deal with semi-broken packages that prepend drive letters to remote files. For that reason, Tramp @@ -1612,7 +1612,7 @@ Return t if the file exists and loads successfully. */) lread_close (fd); clear_unwind_protect (fd_index); } - val = call4 (Vload_source_file_function, found, hist_file_name, + val = calln (Vload_source_file_function, found, hist_file_name, NILP (noerror) ? Qnil : Qt, (NILP (nomessage) || force_load_messages) ? Qnil : Qt); return unbind_to (count, val); @@ -1739,7 +1739,7 @@ Return t if the file exists and loads successfully. */) /* Run any eval-after-load forms for this file. */ if (!NILP (Ffboundp (Qdo_after_load_evaluation))) - call1 (Qdo_after_load_evaluation, hist_file_name) ; + calln (Qdo_after_load_evaluation, hist_file_name); for (int i = 0; i < ARRAYELTS (saved_strings); i++) { @@ -2079,7 +2079,7 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes, exists = !NILP (Ffile_readable_p (string)); else { - Lisp_Object tmp = call1 (predicate, string); + Lisp_Object tmp = calln (predicate, string); if (NILP (tmp)) exists = false; else if (EQ (tmp, Qdir_ok) @@ -2343,7 +2343,7 @@ readevalloop_eager_expand_eval (Lisp_Object val, Lisp_Object macroexpand) form in the progn as a top-level form. This way, if one form in the progn defines a macro, that macro is in effect when we expand the remaining forms. See similar code in bytecomp.el. */ - val = call2 (macroexpand, val, Qnil); + val = calln (macroexpand, val, Qnil); if (EQ (CAR_SAFE (val), Qprogn)) { Lisp_Object subforms = XCDR (val); @@ -2352,7 +2352,7 @@ readevalloop_eager_expand_eval (Lisp_Object val, Lisp_Object macroexpand) val = readevalloop_eager_expand_eval (XCAR (subforms), macroexpand); } else - val = eval_sub (call2 (macroexpand, val, Qt)); + val = eval_sub (calln (macroexpand, val, Qt)); return val; } @@ -2501,7 +2501,7 @@ readevalloop (Lisp_Object readcharfun, { if (!NILP (readfun)) { - val = call1 (readfun, readcharfun); + val = calln (readfun, readcharfun); /* If READCHARFUN has set point to ZV, we should stop reading, even if the form read sets point @@ -2514,7 +2514,7 @@ readevalloop (Lisp_Object readcharfun, } } else if (! NILP (Vload_read_function)) - val = call1 (Vload_read_function, readcharfun); + val = calln (Vload_read_function, readcharfun); else val = read_internal_start (readcharfun, Qnil, Qnil, false); } @@ -2673,8 +2673,7 @@ STREAM or the value of `standard-input' may be: minibuffer without a stream, as in (read). But is this feature ever used, and if so, why? IOW, will anything break if this feature is removed !? */ - return call1 (Qread_minibuffer, - build_string ("Lisp expression: ")); + return calln (Qread_minibuffer, build_string ("Lisp expression: ")); return read_internal_start (stream, Qnil, Qnil, false); } @@ -2701,8 +2700,7 @@ STREAM or the value of `standard-input' may be: stream = Qread_char; if (EQ (stream, Qread_char)) /* FIXME: ?! When is this used !? */ - return call1 (Qread_minibuffer, - build_string ("Lisp expression: ")); + return calln (Qread_minibuffer, build_string ("Lisp expression: ")); return read_internal_start (stream, Qnil, Qnil, true); } @@ -2811,7 +2809,7 @@ character_name_to_code (char const *name, ptrdiff_t name_len, Lisp_Object code = (name[0] == 'U' && name[1] == '+' ? string_to_number (name + 1, 16, &len) - : call2 (Qchar_from_name, make_unibyte_string (name, name_len), Qt)); + : calln (Qchar_from_name, make_unibyte_string (name, name_len), Qt)); if (! RANGED_FIXNUMP (0, code, MAX_UNICODE_CHAR) || len != name_len - 1 @@ -5400,7 +5398,7 @@ map_obarray (Lisp_Object obarray, static void mapatoms_1 (Lisp_Object sym, Lisp_Object function) { - call1 (function, sym); + calln (function, sym); } DEFUN ("mapatoms", Fmapatoms, Smapatoms, 1, 2, 0, diff --git a/src/minibuf.c b/src/minibuf.c index d1056d7f12c..3f79726624a 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -157,8 +157,8 @@ zip_minibuffer_stacks (Lisp_Object dest_window, Lisp_Object source_window) return; } - call1 (Qrecord_window_buffer, dest_window); - call1 (Qrecord_window_buffer, source_window); + calln (Qrecord_window_buffer, dest_window); + calln (Qrecord_window_buffer, source_window); acc = merge_c (dw->prev_buffers, sw->prev_buffers, minibuffer_ent_greater); @@ -485,7 +485,7 @@ confirm the aborting of the current minibuffer and all contained ones. */) to abort any extra non-minibuffer recursive edits. Thus, the number of recursive edits we have to abort equals the number of minibuffers we have to abort. */ - call1 (Qminibuffer_quit_recursive_edit, array[1]); + calln (Qminibuffer_quit_recursive_edit, array[1]); } } else @@ -656,7 +656,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, } MB_frame = XWINDOW (XFRAME (selected_frame)->minibuffer_window)->frame; - call1 (Qrecord_window_buffer, minibuf_window); + calln (Qrecord_window_buffer, minibuf_window); record_unwind_protect_void (minibuffer_unwind); @@ -835,7 +835,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, /* Turn on an input method stored in INPUT_METHOD if any. */ if (STRINGP (input_method) && !NILP (Ffboundp (Qactivate_input_method))) - call1 (Qactivate_input_method, input_method); + calln (Qactivate_input_method, input_method); run_hook (Qminibuffer_setup_hook); @@ -893,7 +893,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, done after the previous buffer has been made current again, in case the history variable is buffer-local. */ if (! (NILP (Vhistory_add_new_input) || NILP (histstring))) - call2 (Qadd_to_history, histvar, histstring); + calln (Qadd_to_history, histvar, histstring); /* The appropriate frame will get selected in set-window-configuration. */ @@ -907,7 +907,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, && !EQ (XWINDOW (XFRAME (calling_frame)->minibuffer_window) ->frame, calling_frame)))) - call2 (Qselect_frame_set_input_focus, calling_frame, Qnil); + calln (Qselect_frame_set_input_focus, calling_frame, Qnil); /* If Lisp form desired instead of string, parse it. */ if (expflag) @@ -1490,8 +1490,8 @@ behavior. */) result = (NILP (predicate) /* Partial backward compatibility for older read_buffer_functions which don't expect a `predicate' argument. */ - ? call3 (Vread_buffer_function, prompt, def, require_match) - : call4 (Vread_buffer_function, prompt, def, require_match, + ? calln (Vread_buffer_function, prompt, def, require_match) + : calln (Vread_buffer_function, prompt, def, require_match, predicate)); return unbind_to (count, result); } @@ -1556,7 +1556,7 @@ or from one of the possible completions. */) CHECK_STRING (string); if (type == function_table) - return call3 (collection, string, predicate, Qnil); + return calln (collection, string, predicate, Qnil); bestmatch = bucket = Qnil; zero = make_fixnum (0); @@ -1624,11 +1624,11 @@ or from one of the possible completions. */) else { if (type == hash_table) - tem = call2 (predicate, elt, + tem = calln (predicate, elt, HASH_VALUE (XHASH_TABLE (collection), idx - 1)); else - tem = call1 (predicate, elt); + tem = calln (predicate, elt); } if (NILP (tem)) continue; } @@ -1771,7 +1771,7 @@ the string key and the associated value. */) CHECK_STRING (string); if (type == 0) - return call3 (collection, string, predicate, Qt); + return calln (collection, string, predicate, Qt); allmatches = bucket = Qnil; zero = make_fixnum (0); @@ -1839,11 +1839,11 @@ the string key and the associated value. */) else { if (type == 3) - tem = call2 (predicate, elt, + tem = calln (predicate, elt, HASH_VALUE (XHASH_TABLE (collection), idx - 1)); else - tem = call1 (predicate, elt); + tem = calln (predicate, elt); } if (NILP (tem)) continue; } @@ -2002,14 +2002,14 @@ the values STRING, PREDICATE and `lambda'. */) found_matching_key: ; } else - return call3 (collection, string, predicate, Qlambda); + return calln (collection, string, predicate, Qlambda); /* Finally, check the predicate. */ if (!NILP (predicate)) { return HASH_TABLE_P (collection) - ? call2 (predicate, tem, arg) - : call1 (predicate, tem); + ? calln (predicate, tem, arg) + : calln (predicate, tem); } else return Qt; diff --git a/src/nsfns.m b/src/nsfns.m index 721dc4995c0..a2c50468cd1 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -2517,7 +2517,7 @@ DEFUN ("system-move-file-to-trash", Fsystem_move_file_to_trash, handler = Ffind_file_name_handler (filename, operation); if (!NILP (handler)) - return call2 (handler, operation, filename); + return calln (handler, operation, filename); else { NSFileManager *fm = [NSFileManager defaultManager]; @@ -3144,7 +3144,7 @@ ns_create_tip_frame (struct ns_display_info *dpyinfo, Lisp_Object parms) { Lisp_Object bg = Fframe_parameter (frame, Qbackground_color); - call2 (Qface_set_after_frame_default, frame, Qnil); + calln (Qface_set_after_frame_default, frame, Qnil); if (!EQ (bg, Fframe_parameter (frame, Qbackground_color))) { @@ -3183,7 +3183,7 @@ x_hide_tip (bool delete) { if (!NILP (tip_timer)) { - call1 (Qcancel_timer, tip_timer); + calln (Qcancel_timer, tip_timer); tip_timer = Qnil; } @@ -3334,7 +3334,7 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, tip_f = XFRAME (tip_frame); if (!NILP (tip_timer)) { - call1 (Qcancel_timer, tip_timer); + calln (Qcancel_timer, tip_timer); tip_timer = Qnil; } @@ -3382,11 +3382,11 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, } else tip_last_parms - = call2 (Qassq_delete_all, parm, tip_last_parms); + = calln (Qassq_delete_all, parm, tip_last_parms); } else tip_last_parms - = call2 (Qassq_delete_all, parm, tip_last_parms); + = calln (Qassq_delete_all, parm, tip_last_parms); } /* Now check if every parameter in what is left of @@ -3548,8 +3548,7 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, start_timer: /* Let the tip disappear after timeout seconds. */ - tip_timer = call3 (Qrun_at_time, timeout, Qnil, - Qx_hide_tip); + tip_timer = calln (Qrun_at_time, timeout, Qnil, Qx_hide_tip); } return unbind_to (count, Qnil); diff --git a/src/nsselect.m b/src/nsselect.m index 4b5fe6770c2..8220ccd9566 100644 --- a/src/nsselect.m +++ b/src/nsselect.m @@ -439,7 +439,7 @@ anything that the functions on `selection-converter-alist' know about. */) { /* FIXME: Use run-hook-with-args! */ for (rest = Vns_sent_selection_hooks; CONSP (rest); rest = Fcdr (rest)) - call3 (Fcar (rest), selection, target_symbol, successful_p); + calln (Fcar (rest), selection, target_symbol, successful_p); } return value; diff --git a/src/pgtkfns.c b/src/pgtkfns.c index 4becb5492ac..9251e137f09 100644 --- a/src/pgtkfns.c +++ b/src/pgtkfns.c @@ -2849,7 +2849,7 @@ x_create_tip_frame (struct pgtk_display_info *dpyinfo, Lisp_Object parms, struct { Lisp_Object bg = Fframe_parameter (frame, Qbackground_color); - call2 (Qface_set_after_frame_default, frame, Qnil); + calln (Qface_set_after_frame_default, frame, Qnil); if (!EQ (bg, Fframe_parameter (frame, Qbackground_color))) { @@ -2996,7 +2996,7 @@ pgtk_hide_tip (bool delete) { if (!NILP (tip_timer)) { - call1 (Qcancel_timer, tip_timer); + calln (Qcancel_timer, tip_timer); tip_timer = Qnil; } @@ -3175,7 +3175,7 @@ Text larger than the specified size is clipped. */) tip_f = XFRAME (tip_frame); if (!NILP (tip_timer)) { - call1 (Qcancel_timer, tip_timer); + calln (Qcancel_timer, tip_timer); tip_timer = Qnil; } @@ -3213,11 +3213,11 @@ Text larger than the specified size is clipped. */) } else tip_last_parms = - call2 (Qassq_delete_all, parm, tip_last_parms); + calln (Qassq_delete_all, parm, tip_last_parms); } else tip_last_parms = - call2 (Qassq_delete_all, parm, tip_last_parms); + calln (Qassq_delete_all, parm, tip_last_parms); } /* Now check if every parameter in what is left of @@ -3376,7 +3376,7 @@ Text larger than the specified size is clipped. */) start_timer: /* Let the tip disappear after timeout seconds. */ - tip_timer = call3 (Qrun_at_time, timeout, Qnil, Qx_hide_tip); + tip_timer = calln (Qrun_at_time, timeout, Qnil, Qx_hide_tip); return unbind_to (count, Qnil); } diff --git a/src/pgtkselect.c b/src/pgtkselect.c index f1a9214a6b4..c05594d7366 100644 --- a/src/pgtkselect.c +++ b/src/pgtkselect.c @@ -266,10 +266,8 @@ pgtk_get_local_selection (Lisp_Object selection_symbol, Lisp_Object target_type, } if (!NILP (handler_fn)) - value = call3 (handler_fn, selection_symbol, - (local_request - ? Qnil - : target_type), + value = calln (handler_fn, selection_symbol, + (local_request ? Qnil : target_type), tem); else value = Qnil; diff --git a/src/print.c b/src/print.c index f3814859cb3..f990d6a5dc1 100644 --- a/src/print.c +++ b/src/print.c @@ -306,7 +306,7 @@ static void printchar (unsigned int ch, Lisp_Object fun) { if (!NILP (fun) && !EQ (fun, Qt)) - call1 (fun, make_fixnum (ch)); + calln (fun, make_fixnum (ch)); else { unsigned char str[MAX_MULTIBYTE_LENGTH]; diff --git a/src/process.c b/src/process.c index e25228b3d6a..cd1149ae8b0 100644 --- a/src/process.c +++ b/src/process.c @@ -3367,7 +3367,7 @@ finish_after_tls_connection (Lisp_Object proc) Lisp_Object result = Qt; if (!NILP (Ffboundp (Qnsm_verify_connection))) - result = call3 (Qnsm_verify_connection, + result = calln (Qnsm_verify_connection, proc, plist_get (contact, QChost), plist_get (contact, QCservice)); @@ -4963,7 +4963,7 @@ server_accept_connection (Lisp_Object server, int channel) { int code = errno; if (!would_block (code) && !NILP (ps->log)) - call3 (ps->log, server, Qnil, + calln (ps->log, server, Qnil, concat3 (build_string ("accept failed with code"), Fnumber_to_string (make_fixnum (code)), build_string ("\n"))); @@ -5125,7 +5125,7 @@ server_accept_connection (Lisp_Object server, int channel) if (!NILP (ps->log)) { AUTO_STRING (accept_from, "accept from "); - call3 (ps->log, server, proc, concat3 (accept_from, host_string, nl)); + calln (ps->log, server, proc, concat3 (accept_from, host_string, nl)); } AUTO_STRING (open_from, "open from "); @@ -8462,7 +8462,7 @@ See `process-attributes' for getting attributes of a process given its ID. */) = Ffind_file_name_handler (BVAR (current_buffer, directory), Qlist_system_processes); if (!NILP (handler)) - return call1 (handler, Qlist_system_processes); + return calln (handler, Qlist_system_processes); return list_system_processes (); } @@ -8526,7 +8526,7 @@ integer or floating point values. = Ffind_file_name_handler (BVAR (current_buffer, directory), Qprocess_attributes); if (!NILP (handler)) - return call2 (handler, Qprocess_attributes, pid); + return calln (handler, Qprocess_attributes, pid); return system_process_attributes (pid); } diff --git a/src/sort.c b/src/sort.c index 7f079cecd45..fb00f5cc8ea 100644 --- a/src/sort.c +++ b/src/sort.c @@ -198,7 +198,7 @@ typedef struct merge_state static bool order_pred_lisp (merge_state *ms, Lisp_Object a, Lisp_Object b) { - return !NILP (call2 (ms->predicate, a, b)); + return !NILP (calln (ms->predicate, a, b)); } static bool @@ -1127,7 +1127,7 @@ tim_sort (Lisp_Object predicate, Lisp_Object keyfunc, (any call to keyfunc might trigger a GC). */ if (!NILP (keyfunc)) for (ptrdiff_t i = 0; i < length; i++) - keys[i] = call1 (keyfunc, seq[i]); + keys[i] = calln (keyfunc, seq[i]); /* FIXME: This is where we would check the keys for interesting properties for more optimized comparison (such as all being fixnums diff --git a/src/syntax.c b/src/syntax.c index 0de7d49a304..f9734bffa14 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -580,7 +580,7 @@ find_defun_start (ptrdiff_t pos, ptrdiff_t pos_byte) return find_start_value; modiff_count modiffs = CHARS_MODIFF; - Lisp_Object ppss = call1 (Qsyntax_ppss, make_fixnum (pos)); + Lisp_Object ppss = calln (Qsyntax_ppss, make_fixnum (pos)); if (modiffs != CHARS_MODIFF) error ("syntax-ppss modified the buffer!"); TEMP_SET_PT_BOTH (opoint, opoint_byte); @@ -1371,7 +1371,7 @@ DEFUN ("internal-describe-syntax-value", Finternal_describe_syntax_value, { AUTO_STRING (prefixdoc, ",\n\t is a prefix character for `backward-prefix-chars'"); - insert1 (call1 (Qsubstitute_command_keys, prefixdoc)); + insert1 (calln (Qsubstitute_command_keys, prefixdoc)); } return syntax; @@ -1415,7 +1415,7 @@ scan_words (ptrdiff_t from, EMACS_INT count) func = CHAR_TABLE_REF (Vfind_word_boundary_function_table, ch0); if (! NILP (Ffboundp (func))) { - pos = call2 (func, make_fixnum (from - 1), make_fixnum (end)); + pos = calln (func, make_fixnum (from - 1), make_fixnum (end)); if (FIXNUMP (pos) && from < XFIXNUM (pos) && XFIXNUM (pos) <= ZV) { from = XFIXNUM (pos); @@ -1464,7 +1464,7 @@ scan_words (ptrdiff_t from, EMACS_INT count) func = CHAR_TABLE_REF (Vfind_word_boundary_function_table, ch1); if (! NILP (Ffboundp (func))) { - pos = call2 (func, make_fixnum (from), make_fixnum (beg)); + pos = calln (func, make_fixnum (from), make_fixnum (beg)); if (FIXNUMP (pos) && BEGV <= XFIXNUM (pos) && XFIXNUM (pos) < from) { from = XFIXNUM (pos); diff --git a/src/textconv.c b/src/textconv.c index 80b1a37f0fd..105a8077072 100644 --- a/src/textconv.c +++ b/src/textconv.c @@ -1308,7 +1308,7 @@ really_set_point_and_mark (struct frame *f, ptrdiff_t point, && !NILP (BVAR (current_buffer, mark_active))) call0 (Qdeactivate_mark); else - call1 (Qpush_mark, make_fixnum (mark)); + calln (Qpush_mark, make_fixnum (mark)); /* Update the ephemeral last point. */ w = XWINDOW (selected_window); diff --git a/src/textprop.c b/src/textprop.c index 1803f2d1cb0..30c26ce4809 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -2167,7 +2167,7 @@ call_mod_hooks (Lisp_Object list, Lisp_Object start, Lisp_Object end) { while (!NILP (list)) { - call2 (Fcar (list), start, end); + calln (Fcar (list), start, end); list = Fcdr (list); } } diff --git a/src/undo.c b/src/undo.c index e460c5de212..87d3fc2602d 100644 --- a/src/undo.c +++ b/src/undo.c @@ -358,7 +358,7 @@ truncate_undo_list (struct buffer *b) Lisp_Object tem; /* Normally the function this calls is undo-outer-limit-truncate. */ - tem = call1 (Vundo_outer_limit_function, make_int (size_so_far)); + tem = calln (Vundo_outer_limit_function, make_int (size_so_far)); if (! NILP (tem)) { /* The function is responsible for making diff --git a/src/w32fns.c b/src/w32fns.c index 452740f46ca..c2551ea2378 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -7574,7 +7574,7 @@ w32_create_tip_frame (struct w32_display_info *dpyinfo, Lisp_Object parms) Lisp_Object fg = Fframe_parameter (frame, Qforeground_color); Lisp_Object colors = Qnil; - call2 (Qface_set_after_frame_default, frame, Qnil); + calln (Qface_set_after_frame_default, frame, Qnil); if (!EQ (bg, Fframe_parameter (frame, Qbackground_color))) colors = Fcons (Fcons (Qbackground_color, bg), colors); @@ -7723,7 +7723,7 @@ w32_hide_tip (bool delete) { if (!NILP (tip_timer)) { - call1 (Qcancel_timer, tip_timer); + calln (Qcancel_timer, tip_timer); tip_timer = Qnil; } @@ -7816,7 +7816,7 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, Lisp_Object timer = tip_timer; tip_timer = Qnil; - call1 (Qcancel_timer, timer); + calln (Qcancel_timer, timer); } block_input (); @@ -7867,11 +7867,11 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, } else tip_last_parms = - call2 (Qassq_delete_all, parm, tip_last_parms); + calln (Qassq_delete_all, parm, tip_last_parms); } else tip_last_parms = - call2 (Qassq_delete_all, parm, tip_last_parms); + calln (Qassq_delete_all, parm, tip_last_parms); } /* Now check if there's a parameter left in tip_last_parms with a @@ -8053,8 +8053,7 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, start_timer: /* Let the tip disappear after timeout seconds. */ - tip_timer = call3 (Qrun_at_time, timeout, Qnil, - Qx_hide_tip); + tip_timer = calln (Qrun_at_time, timeout, Qnil, Qx_hide_tip); return unbind_to (count, Qnil); } @@ -8539,7 +8538,7 @@ DEFUN ("system-move-file-to-trash", Fsystem_move_file_to_trash, handler = Ffind_file_name_handler (filename, operation); if (!NILP (handler)) - return call2 (handler, operation, filename); + return calln (handler, operation, filename); else { const char * path; @@ -9727,7 +9726,7 @@ DEFUN ("file-system-info", Ffile_system_info, Sfile_system_info, 1, 1, 0, Lisp_Object handler = Ffind_file_name_handler (encoded, Qfile_system_info); if (!NILP (handler)) { - value = call2 (handler, Qfile_system_info, encoded); + value = calln (handler, Qfile_system_info, encoded); if (CONSP (value) || NILP (value)) return value; error ("Invalid handler in `file-name-handler-alist'"); diff --git a/src/window.c b/src/window.c index 38f5307cb68..0ed1b53d866 100644 --- a/src/window.c +++ b/src/window.c @@ -2665,8 +2665,8 @@ recombine_windows (Lisp_Object window) static void delete_deletable_window (Lisp_Object window) { - if (!NILP (call1 (Qwindow_deletable_p, window))) - call1 (Qdelete_window, window); + if (!NILP (calln (Qwindow_deletable_p, window))) + calln (Qdelete_window, window); } /*********************************************************************** @@ -3331,7 +3331,7 @@ resize_root_window (Lisp_Object window, Lisp_Object delta, Lisp_Object horizontal, Lisp_Object ignore, Lisp_Object pixelwise) { - return call5 (Qwindow__resize_root_window, window, delta, + return calln (Qwindow__resize_root_window, window, delta, horizontal, ignore, pixelwise); } @@ -3339,7 +3339,7 @@ resize_root_window (Lisp_Object window, Lisp_Object delta, static Lisp_Object window_pixel_to_total (Lisp_Object frame, Lisp_Object horizontal) { - return call2 (Qwindow__pixel_to_total, frame, horizontal); + return calln (Qwindow__pixel_to_total, frame, horizontal); } @@ -3710,7 +3710,7 @@ replace_buffer_in_windows (Lisp_Object buffer) /* When kill-buffer is called early during loadup, this function is undefined. */ if (!NILP (Ffboundp (Qreplace_buffer_in_windows))) - call1 (Qreplace_buffer_in_windows, buffer); + calln (Qreplace_buffer_in_windows, buffer); } /** If BUFFER is shown in any window, safely replace it with some other @@ -4435,7 +4435,7 @@ This function runs `window-scroll-functions' before running dedication. */ wset_dedicated (w, Qnil); - call1 (Qrecord_window_buffer, window); + calln (Qrecord_window_buffer, window); } unshow_buffer (w); @@ -4449,7 +4449,7 @@ This function runs `window-scroll-functions' before running static Lisp_Object display_buffer (Lisp_Object buffer, Lisp_Object not_this_window_p, Lisp_Object override_frame) { - return call3 (Qdisplay_buffer, buffer, not_this_window_p, override_frame); + return calln (Qdisplay_buffer, buffer, not_this_window_p, override_frame); } DEFUN ("force-window-update", Fforce_window_update, Sforce_window_update, @@ -4513,7 +4513,7 @@ temp_output_buffer_show (register Lisp_Object buf) set_buffer_internal (old); if (!NILP (Vtemp_buffer_show_function)) - call1 (Vtemp_buffer_show_function, buf); + calln (Vtemp_buffer_show_function, buf); else if (WINDOW_LIVE_P (window = display_buffer (buf, Qnil, Qnil))) { if (!EQ (XWINDOW (window)->frame, selected_frame)) @@ -5644,7 +5644,7 @@ grow_mini_window (struct window *w, int delta) struct window *r = XWINDOW (root); Lisp_Object grow; - grow = call3 (Qwindow__resize_root_window_vertically, + grow = calln (Qwindow__resize_root_window_vertically, root, make_fixnum (- delta), Qt); if (FIXNUMP (grow) @@ -5682,7 +5682,7 @@ shrink_mini_window (struct window *w) struct window *r = XWINDOW (root); Lisp_Object grow; - grow = call3 (Qwindow__resize_root_window_vertically, + grow = calln (Qwindow__resize_root_window_vertically, root, make_fixnum (delta), Qt); if (FIXNUMP (grow) && window_resize_check (r, false)) @@ -7493,7 +7493,7 @@ the return value is nil. Otherwise the value is t. */) && (NILP (Fminibufferp (p->buffer, Qnil)))) /* If a window we restore gets another buffer, record the window's old buffer. */ - call1 (Qrecord_window_buffer, window); + calln (Qrecord_window_buffer, window); } /* Disallow set_window_size_hook, temporarily. */ diff --git a/src/xfaces.c b/src/xfaces.c index 5c1300309dd..5e76e598d84 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -1087,7 +1087,7 @@ tty_lookup_color (struct frame *f, Lisp_Object color, Emacs_Color *tty_color, XSETFRAME (frame, f); - color_desc = call2 (Qtty_color_desc, color, frame); + color_desc = calln (Qtty_color_desc, color, frame); if (CONSP (color_desc) && CONSP (XCDR (color_desc))) { Lisp_Object rgb; @@ -1116,7 +1116,7 @@ tty_lookup_color (struct frame *f, Lisp_Object color, Emacs_Color *tty_color, && !NILP (Ffboundp (Qtty_color_standard_values))) { /* Look up STD_COLOR separately. */ - rgb = call1 (Qtty_color_standard_values, color); + rgb = calln (Qtty_color_standard_values, color); if (! parse_rgb_list (rgb, std_color)) return false; } @@ -1178,7 +1178,7 @@ tty_color_name (struct frame *f, int idx) Lisp_Object coldesc; XSETFRAME (frame, f); - coldesc = call2 (Qtty_color_by_index, make_fixnum (idx), frame); + coldesc = calln (Qtty_color_by_index, make_fixnum (idx), frame); if (!NILP (coldesc)) return XCAR (coldesc); @@ -3827,7 +3827,7 @@ update_face_from_frame_parameter (struct frame *f, Lisp_Object param, mode, so that we have to load new defface specs. Call frame-set-background-mode to do that. */ XSETFRAME (frame, f); - call1 (Qframe_set_background_mode, frame); + calln (Qframe_set_background_mode, frame); face = Qdefault; lface = lface_from_face_name (f, face, true); @@ -4750,7 +4750,7 @@ the triangle inequality. */) if (NILP (metric)) return make_fixnum (color_distance (&cdef1, &cdef2)); else - return call2 (metric, + return calln (metric, list3i (cdef1.red, cdef1.green, cdef1.blue), list3i (cdef2.red, cdef2.green, cdef2.blue)); } @@ -6561,7 +6561,7 @@ map_tty_color (struct frame *f, struct face *face, Lisp_Object color, if (STRINGP (color) && SCHARS (color) && CONSP (Vtty_defined_color_alist) - && (def = assoc_no_quit (color, call1 (Qtty_color_alist, frame)), + && (def = assoc_no_quit (color, calln (Qtty_color_alist, frame)), CONSP (def))) { /* Associations in tty-defined-color-alist are of the form diff --git a/src/xfns.c b/src/xfns.c index b4d08bfc202..f0207ebbcee 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -8672,7 +8672,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, Lisp_Object parms) { Lisp_Object bg = Fframe_parameter (frame, Qbackground_color); - call2 (Qface_set_after_frame_default, frame, Qnil); + calln (Qface_set_after_frame_default, frame, Qnil); if (!EQ (bg, Fframe_parameter (frame, Qbackground_color))) { @@ -8844,7 +8844,7 @@ x_hide_tip (bool delete) { if (!NILP (tip_timer)) { - call1 (Qcancel_timer, tip_timer); + calln (Qcancel_timer, tip_timer); tip_timer = Qnil; } @@ -9071,7 +9071,7 @@ Text larger than the specified size is clipped. */) tip_f = XFRAME (tip_frame); if (!NILP (tip_timer)) { - call1 (Qcancel_timer, tip_timer); + calln (Qcancel_timer, tip_timer); tip_timer = Qnil; } @@ -9110,11 +9110,11 @@ Text larger than the specified size is clipped. */) } else tip_last_parms = - call2 (Qassq_delete_all, parm, tip_last_parms); + calln (Qassq_delete_all, parm, tip_last_parms); } else tip_last_parms = - call2 (Qassq_delete_all, parm, tip_last_parms); + calln (Qassq_delete_all, parm, tip_last_parms); } /* Now check if every parameter in what is left of @@ -9296,8 +9296,7 @@ Text larger than the specified size is clipped. */) start_timer: /* Let the tip disappear after timeout seconds. */ - tip_timer = call3 (Qrun_at_time, timeout, Qnil, - Qx_hide_tip); + tip_timer = calln (Qrun_at_time, timeout, Qnil, Qx_hide_tip); return unbind_to (count, Qnil); } diff --git a/src/xmenu.c b/src/xmenu.c index 848ff6e21cf..ce5cdbcfc0b 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1431,7 +1431,7 @@ menu_position_func (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer #endif /* TODO: Get the monitor workarea directly without calculating other items in x-display-monitor-attributes-list. */ - workarea = call3 (Qframe_monitor_workarea, + workarea = calln (Qframe_monitor_workarea, Qnil, make_fixnum (data->x), make_fixnum (data->y)); diff --git a/src/xselect.c b/src/xselect.c index c830a6df6c1..5e494a2ca22 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -396,7 +396,7 @@ x_get_local_selection (Lisp_Object selection_symbol, Lisp_Object target_type, } if (!NILP (handler_fn)) - value = call3 (handler_fn, selection_symbol, + value = calln (handler_fn, selection_symbol, ((local_request && NILP (Vx_treat_local_requests_remotely)) ? Qnil diff --git a/src/xterm.c b/src/xterm.c index 43788af59d0..b16f4ddfccf 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -13095,7 +13095,7 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, Atom xaction, ref = SPECPDL_INDEX (); record_unwind_protect_ptr (x_dnd_cleanup_drag_and_drop, f); - call2 (Vx_dnd_movement_function, frame_object, + calln (Vx_dnd_movement_function, frame_object, Fposn_at_x_y (x, y, frame_object, Qnil)); x_dnd_unwind_flag = false; unbind_to (ref, Qnil); @@ -13129,7 +13129,7 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, Atom xaction, ref = SPECPDL_INDEX (); record_unwind_protect_ptr (x_dnd_cleanup_drag_and_drop, f); - call4 (Vx_dnd_wheel_function, + calln (Vx_dnd_wheel_function, Fposn_at_x_y (x, y, frame_object, Qnil), make_fixnum (x_dnd_wheel_button), make_uint (x_dnd_wheel_state), @@ -13198,7 +13198,7 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, Atom xaction, record_unwind_protect_ptr (x_dnd_cleanup_drag_and_drop, f); if (!NILP (Vx_dnd_unsupported_drop_function)) - val = call8 (Vx_dnd_unsupported_drop_function, + val = calln (Vx_dnd_unsupported_drop_function, XCAR (XCDR (x_dnd_unsupported_drop_data)), Fnth (make_fixnum (3), x_dnd_unsupported_drop_data), Fnth (make_fixnum (4), x_dnd_unsupported_drop_data), -- 2.39.5