aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Kangas2025-01-14 00:16:40 +0100
committerStefan Kangas2025-01-14 00:16:40 +0100
commit383de5c3f6f1ca7c8da7450d6e1716b43e9d2020 (patch)
tree0ec1c0c1bf4f29387d6361bdc6f0073378344d7d /src
parentf0e63558bd3dfd9e57cacfba8690f9dd29774947 (diff)
downloademacs-383de5c3f6f1ca7c8da7450d6e1716b43e9d2020.tar.gz
emacs-383de5c3f6f1ca7c8da7450d6e1716b43e9d2020.zip
Prefer calln to CALLN where applicable
* src/callint.c (read_file_name): * src/comp.c (CALL0I, CALL1I, CALL2I, CALL4I, declare_imported_func): * src/data.c (Ffset, notify_variable_watchers): * src/eval.c (Ffuncall_with_delayed_message): * src/keymap.c (Fdescribe_buffer_bindings): * src/minibuf.c (Fread_buffer, Fcompleting_read): * src/pdumper.c (Fdump_emacs_portable): * src/print.c (print_vectorlike_unreadable): * src/treesit.c (treesit_traverse_match_predicate) (treesit_build_sparse_tree): Prefer calln to CALLN.
Diffstat (limited to 'src')
-rw-r--r--src/callint.c2
-rw-r--r--src/comp.c10
-rw-r--r--src/data.c4
-rw-r--r--src/eval.c2
-rw-r--r--src/keymap.c30
-rw-r--r--src/minibuf.c6
-rw-r--r--src/pdumper.c2
-rw-r--r--src/print.c3
-rw-r--r--src/treesit.c6
9 files changed, 26 insertions, 39 deletions
diff --git a/src/callint.c b/src/callint.c
index 2308fc4e127..40f3abae00e 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -228,7 +228,7 @@ static Lisp_Object
228read_file_name (Lisp_Object default_filename, Lisp_Object mustmatch, 228read_file_name (Lisp_Object default_filename, Lisp_Object mustmatch,
229 Lisp_Object initial, Lisp_Object predicate) 229 Lisp_Object initial, Lisp_Object predicate)
230{ 230{
231 return CALLN (Ffuncall, Qread_file_name, 231 return calln (Qread_file_name,
232 callint_message, Qnil, default_filename, 232 callint_message, Qnil, default_filename,
233 mustmatch, initial, predicate); 233 mustmatch, initial, predicate);
234} 234}
diff --git a/src/comp.c b/src/comp.c
index b96fae4ae95..8b56bcf0257 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -504,19 +504,19 @@ load_gccjit_if_necessary (bool mandatory)
504 504
505/* Like call0 but stringify and intern. */ 505/* Like call0 but stringify and intern. */
506#define CALL0I(fun) \ 506#define CALL0I(fun) \
507 CALLN (Ffuncall, intern_c_string (STR (fun))) 507 calln (intern_c_string (STR (fun)))
508 508
509/* Like call1 but stringify and intern. */ 509/* Like call1 but stringify and intern. */
510#define CALL1I(fun, arg) \ 510#define CALL1I(fun, arg) \
511 CALLN (Ffuncall, intern_c_string (STR (fun)), arg) 511 calln (intern_c_string (STR (fun)), arg)
512 512
513/* Like call2 but stringify and intern. */ 513/* Like call2 but stringify and intern. */
514#define CALL2I(fun, arg1, arg2) \ 514#define CALL2I(fun, arg1, arg2) \
515 CALLN (Ffuncall, intern_c_string (STR (fun)), arg1, arg2) 515 calln (intern_c_string (STR (fun)), arg1, arg2)
516 516
517/* Like call4 but stringify and intern. */ 517/* Like call4 but stringify and intern. */
518#define CALL4I(fun, arg1, arg2, arg3, arg4) \ 518#define CALL4I(fun, arg1, arg2, arg3, arg4) \
519 CALLN (Ffuncall, intern_c_string (STR (fun)), arg1, arg2, arg3, arg4) 519 calln (intern_c_string (STR (fun)), arg1, arg2, arg3, arg4)
520 520
521#define DECL_BLOCK(name, func) \ 521#define DECL_BLOCK(name, func) \
522 gcc_jit_block *(name) = \ 522 gcc_jit_block *(name) = \
@@ -1016,7 +1016,7 @@ declare_imported_func (Lisp_Object subr_sym, gcc_jit_type *ret_type,
1016 1016
1017 /* String containing the function ptr name. */ 1017 /* String containing the function ptr name. */
1018 Lisp_Object f_ptr_name = 1018 Lisp_Object f_ptr_name =
1019 CALLN (Ffuncall, intern_c_string ("comp-c-func-name"), 1019 calln (intern_c_string ("comp-c-func-name"),
1020 subr_sym, make_string ("R", 1)); 1020 subr_sym, make_string ("R", 1));
1021 1021
1022 gcc_jit_type *f_ptr_type = 1022 gcc_jit_type *f_ptr_type =
diff --git a/src/data.c b/src/data.c
index bbe14c83dfb..be85f817014 100644
--- a/src/data.c
+++ b/src/data.c
@@ -911,7 +911,7 @@ signal a `cyclic-function-indirection' error. */)
911 if (!NILP (Vnative_comp_enable_subr_trampolines) 911 if (!NILP (Vnative_comp_enable_subr_trampolines)
912 && SUBRP (function) 912 && SUBRP (function)
913 && !NATIVE_COMP_FUNCTIONP (function)) 913 && !NATIVE_COMP_FUNCTIONP (function))
914 CALLN (Ffuncall, Qcomp_subr_trampoline_install, symbol); 914 calln (Qcomp_subr_trampoline_install, symbol);
915#endif 915#endif
916 916
917 set_symbol_function (symbol, definition); 917 set_symbol_function (symbol, definition);
@@ -1910,7 +1910,7 @@ notify_variable_watchers (Lisp_Object symbol,
1910 funcall_subr (XSUBR (watcher), ARRAYELTS (args), args); 1910 funcall_subr (XSUBR (watcher), ARRAYELTS (args), args);
1911 } 1911 }
1912 else 1912 else
1913 CALLN (Ffuncall, watcher, symbol, newval, operation, where); 1913 calln (watcher, symbol, newval, operation, where);
1914 } 1914 }
1915 1915
1916 unbind_to (count, Qnil); 1916 unbind_to (count, Qnil);
diff --git a/src/eval.c b/src/eval.c
index a73700419dd..b0cc2505a35 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1169,7 +1169,7 @@ is not displayed. */)
1169 xstrdup (SSDATA (message))); 1169 xstrdup (SSDATA (message)));
1170 record_unwind_protect_ptr (with_delayed_message_cancel, timer); 1170 record_unwind_protect_ptr (with_delayed_message_cancel, timer);
1171 1171
1172 Lisp_Object result = CALLN (Ffuncall, function); 1172 Lisp_Object result = calln (function);
1173 1173
1174 return unbind_to (count, result); 1174 return unbind_to (count, result);
1175} 1175}
diff --git a/src/keymap.c b/src/keymap.c
index 5c0ddcd1d9d..9ff0b52df72 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -2894,8 +2894,7 @@ You type Translation\n\
2894 if (!NILP (Vkey_translation_map)) 2894 if (!NILP (Vkey_translation_map))
2895 { 2895 {
2896 Lisp_Object msg = build_unibyte_string ("Key translations"); 2896 Lisp_Object msg = build_unibyte_string ("Key translations");
2897 CALLN (Ffuncall, 2897 calln (Qhelp__describe_map_tree,
2898 Qhelp__describe_map_tree,
2899 Vkey_translation_map, Qnil, Qnil, prefix, 2898 Vkey_translation_map, Qnil, Qnil, prefix,
2900 msg, nomenu, Qt, Qnil, Qnil, buffer); 2899 msg, nomenu, Qt, Qnil, Qnil, buffer);
2901 } 2900 }
@@ -2908,8 +2907,7 @@ You type Translation\n\
2908 if (!NILP (start1)) 2907 if (!NILP (start1))
2909 { 2908 {
2910 Lisp_Object msg = build_unibyte_string ("\f\nOverriding Bindings"); 2909 Lisp_Object msg = build_unibyte_string ("\f\nOverriding Bindings");
2911 CALLN (Ffuncall, 2910 calln (Qhelp__describe_map_tree,
2912 Qhelp__describe_map_tree,
2913 start1, Qt, shadow, prefix, 2911 start1, Qt, shadow, prefix,
2914 msg, nomenu, Qnil, Qnil, Qnil, buffer); 2912 msg, nomenu, Qnil, Qnil, Qnil, buffer);
2915 shadow = Fcons (start1, shadow); 2913 shadow = Fcons (start1, shadow);
@@ -2921,8 +2919,7 @@ You type Translation\n\
2921 if (!NILP (start1)) 2919 if (!NILP (start1))
2922 { 2920 {
2923 Lisp_Object msg = build_unibyte_string ("\f\nOverriding Bindings"); 2921 Lisp_Object msg = build_unibyte_string ("\f\nOverriding Bindings");
2924 CALLN (Ffuncall, 2922 calln (Qhelp__describe_map_tree,
2925 Qhelp__describe_map_tree,
2926 start1, Qt, shadow, prefix, 2923 start1, Qt, shadow, prefix,
2927 msg, nomenu, Qnil, Qnil, Qnil, buffer); 2924 msg, nomenu, Qnil, Qnil, Qnil, buffer);
2928 shadow = Fcons (start1, shadow); 2925 shadow = Fcons (start1, shadow);
@@ -2944,8 +2941,7 @@ You type Translation\n\
2944 if (!NILP (start1)) 2941 if (!NILP (start1))
2945 { 2942 {
2946 Lisp_Object msg = build_unibyte_string ("\f\n`keymap' Property Bindings"); 2943 Lisp_Object msg = build_unibyte_string ("\f\n`keymap' Property Bindings");
2947 CALLN (Ffuncall, 2944 calln (Qhelp__describe_map_tree,
2948 Qhelp__describe_map_tree,
2949 start1, Qt, shadow, prefix, 2945 start1, Qt, shadow, prefix,
2950 msg, nomenu, Qnil, Qnil, Qnil, buffer); 2946 msg, nomenu, Qnil, Qnil, Qnil, buffer);
2951 shadow = Fcons (start1, shadow); 2947 shadow = Fcons (start1, shadow);
@@ -2977,8 +2973,7 @@ You type Translation\n\
2977 *p = 0; 2973 *p = 0;
2978 2974
2979 Lisp_Object msg = build_unibyte_string (title); 2975 Lisp_Object msg = build_unibyte_string (title);
2980 CALLN (Ffuncall, 2976 calln (Qhelp__describe_map_tree,
2981 Qhelp__describe_map_tree,
2982 maps[i], Qt, shadow, prefix, 2977 maps[i], Qt, shadow, prefix,
2983 msg, nomenu, Qnil, Qnil, Qnil, buffer); 2978 msg, nomenu, Qnil, Qnil, Qnil, buffer);
2984 shadow = Fcons (maps[i], shadow); 2979 shadow = Fcons (maps[i], shadow);
@@ -2995,16 +2990,14 @@ You type Translation\n\
2995 CALLN (Fformat, 2990 CALLN (Fformat,
2996 build_unibyte_string ("\f\n`%s' Major Mode Bindings"), 2991 build_unibyte_string ("\f\n`%s' Major Mode Bindings"),
2997 XBUFFER (buffer)->major_mode_); 2992 XBUFFER (buffer)->major_mode_);
2998 CALLN (Ffuncall, 2993 calln (Qhelp__describe_map_tree,
2999 Qhelp__describe_map_tree,
3000 start1, Qt, shadow, prefix, 2994 start1, Qt, shadow, prefix,
3001 msg, nomenu, Qnil, Qnil, Qnil, buffer); 2995 msg, nomenu, Qnil, Qnil, Qnil, buffer);
3002 } 2996 }
3003 else 2997 else
3004 { 2998 {
3005 Lisp_Object msg = build_unibyte_string ("\f\n`local-map' Property Bindings"); 2999 Lisp_Object msg = build_unibyte_string ("\f\n`local-map' Property Bindings");
3006 CALLN (Ffuncall, 3000 calln (Qhelp__describe_map_tree,
3007 Qhelp__describe_map_tree,
3008 start1, Qt, shadow, prefix, 3001 start1, Qt, shadow, prefix,
3009 msg, nomenu, Qnil, Qnil, Qnil, buffer); 3002 msg, nomenu, Qnil, Qnil, Qnil, buffer);
3010 } 3003 }
@@ -3014,8 +3007,7 @@ You type Translation\n\
3014 } 3007 }
3015 3008
3016 Lisp_Object msg = build_unibyte_string ("\f\nGlobal Bindings"); 3009 Lisp_Object msg = build_unibyte_string ("\f\nGlobal Bindings");
3017 CALLN (Ffuncall, 3010 calln (Qhelp__describe_map_tree,
3018 Qhelp__describe_map_tree,
3019 current_global_map, Qt, shadow, prefix, 3011 current_global_map, Qt, shadow, prefix,
3020 msg, nomenu, Qnil, Qt, Qnil, buffer); 3012 msg, nomenu, Qnil, Qt, Qnil, buffer);
3021 3013
@@ -3023,8 +3015,7 @@ You type Translation\n\
3023 if (!NILP (KVAR (current_kboard, Vlocal_function_key_map))) 3015 if (!NILP (KVAR (current_kboard, Vlocal_function_key_map)))
3024 { 3016 {
3025 Lisp_Object msg = build_unibyte_string ("\f\nFunction key map translations"); 3017 Lisp_Object msg = build_unibyte_string ("\f\nFunction key map translations");
3026 CALLN (Ffuncall, 3018 calln (Qhelp__describe_map_tree,
3027 Qhelp__describe_map_tree,
3028 KVAR (current_kboard, Vlocal_function_key_map), Qnil, Qnil, prefix, 3019 KVAR (current_kboard, Vlocal_function_key_map), Qnil, Qnil, prefix,
3029 msg, nomenu, Qt, Qnil, Qnil, buffer); 3020 msg, nomenu, Qt, Qnil, Qnil, buffer);
3030 } 3021 }
@@ -3033,8 +3024,7 @@ You type Translation\n\
3033 if (!NILP (KVAR (current_kboard, Vinput_decode_map))) 3024 if (!NILP (KVAR (current_kboard, Vinput_decode_map)))
3034 { 3025 {
3035 Lisp_Object msg = build_unibyte_string ("\f\nInput decoding map translations"); 3026 Lisp_Object msg = build_unibyte_string ("\f\nInput decoding map translations");
3036 CALLN (Ffuncall, 3027 calln (Qhelp__describe_map_tree,
3037 Qhelp__describe_map_tree,
3038 KVAR (current_kboard, Vinput_decode_map), Qnil, Qnil, prefix, 3028 KVAR (current_kboard, Vinput_decode_map), Qnil, Qnil, prefix,
3039 msg, nomenu, Qt, Qnil, Qnil, buffer); 3029 msg, nomenu, Qt, Qnil, Qnil, buffer);
3040 } 3030 }
diff --git a/src/minibuf.c b/src/minibuf.c
index bbbc4399ab0..b74e5221420 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1553,8 +1553,7 @@ function, instead of the usual behavior. */)
1553 STRING_MULTIBYTE (prompt)); 1553 STRING_MULTIBYTE (prompt));
1554 } 1554 }
1555 1555
1556 prompt = CALLN (Ffuncall, Qformat_prompt, 1556 prompt = calln (Qformat_prompt, prompt,
1557 prompt,
1558 CONSP (def) ? XCAR (def) : def); 1557 CONSP (def) ? XCAR (def) : def);
1559 } 1558 }
1560 1559
@@ -2040,8 +2039,7 @@ Completion ignores case if the ambient value of
2040See also `completing-read-function'. */) 2039See also `completing-read-function'. */)
2041 (Lisp_Object prompt, Lisp_Object collection, Lisp_Object predicate, Lisp_Object require_match, Lisp_Object initial_input, Lisp_Object hist, Lisp_Object def, Lisp_Object inherit_input_method) 2040 (Lisp_Object prompt, Lisp_Object collection, Lisp_Object predicate, Lisp_Object require_match, Lisp_Object initial_input, Lisp_Object hist, Lisp_Object def, Lisp_Object inherit_input_method)
2042{ 2041{
2043 return CALLN (Ffuncall, 2042 return calln (Fsymbol_value (Qcompleting_read_function),
2044 Fsymbol_value (Qcompleting_read_function),
2045 prompt, collection, predicate, require_match, initial_input, 2043 prompt, collection, predicate, require_match, initial_input,
2046 hist, def, inherit_input_method); 2044 hist, def, inherit_input_method);
2047} 2045}
diff --git a/src/pdumper.c b/src/pdumper.c
index 7d6eabb4b15..97d3d1412b7 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -4156,7 +4156,7 @@ types. */)
4156 error ("No other Lisp threads can be running when this function is called"); 4156 error ("No other Lisp threads can be running when this function is called");
4157 4157
4158#ifdef HAVE_NATIVE_COMP 4158#ifdef HAVE_NATIVE_COMP
4159 CALLN (Ffuncall, intern_c_string ("load--fixup-all-elns")); 4159 calln (intern_c_string ("load--fixup-all-elns"));
4160#endif 4160#endif
4161 4161
4162 check_pure_size (); 4162 check_pure_size ();
diff --git a/src/print.c b/src/print.c
index 4694df98882..f3814859cb3 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1680,8 +1680,7 @@ print_vectorlike_unreadable (Lisp_Object obj, Lisp_Object printcharfun,
1680 record_unwind_current_buffer (); 1680 record_unwind_current_buffer ();
1681 set_buffer_internal (XBUFFER (Vprint__unreadable_callback_buffer)); 1681 set_buffer_internal (XBUFFER (Vprint__unreadable_callback_buffer));
1682 } 1682 }
1683 Lisp_Object result = CALLN (Ffuncall, func, obj, 1683 Lisp_Object result = calln (func, obj, escapeflag? Qt: Qnil);
1684 escapeflag? Qt: Qnil);
1685 unbind_to (count, Qnil); 1684 unbind_to (count, Qnil);
1686 1685
1687 if (!NILP (result)) 1686 if (!NILP (result))
diff --git a/src/treesit.c b/src/treesit.c
index 918b1a510ea..439109e72db 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -3730,7 +3730,7 @@ treesit_traverse_match_predicate (TSTreeCursor *cursor, Lisp_Object pred,
3730 && !(SYMBOLP (pred) && !NILP (Fget (pred, Qtreesit_thing_symbol)))) 3730 && !(SYMBOLP (pred) && !NILP (Fget (pred, Qtreesit_thing_symbol))))
3731 { 3731 {
3732 Lisp_Object lisp_node = make_treesit_node (parser, node); 3732 Lisp_Object lisp_node = make_treesit_node (parser, node);
3733 return !NILP (CALLN (Ffuncall, pred, lisp_node)); 3733 return !NILP (calln (pred, lisp_node));
3734 } 3734 }
3735 else if (SYMBOLP (pred) && BASE_EQ (pred, Qnamed)) 3735 else if (SYMBOLP (pred) && BASE_EQ (pred, Qnamed))
3736 { 3736 {
@@ -3784,7 +3784,7 @@ treesit_traverse_match_predicate (TSTreeCursor *cursor, Lisp_Object pred,
3784 return false; 3784 return false;
3785 3785
3786 Lisp_Object lisp_node = make_treesit_node (parser, node); 3786 Lisp_Object lisp_node = make_treesit_node (parser, node);
3787 if (NILP (CALLN (Ffuncall, cdr, lisp_node))) 3787 if (NILP (calln (cdr, lisp_node)))
3788 return false; 3788 return false;
3789 3789
3790 return true; 3790 return true;
@@ -4053,7 +4053,7 @@ treesit_build_sparse_tree (TSTreeCursor *cursor, Lisp_Object parent,
4053 TSNode node = ts_tree_cursor_current_node (cursor); 4053 TSNode node = ts_tree_cursor_current_node (cursor);
4054 Lisp_Object lisp_node = make_treesit_node (parser, node); 4054 Lisp_Object lisp_node = make_treesit_node (parser, node);
4055 if (!NILP (process_fn)) 4055 if (!NILP (process_fn))
4056 lisp_node = CALLN (Ffuncall, process_fn, lisp_node); 4056 lisp_node = calln (process_fn, lisp_node);
4057 4057
4058 Lisp_Object this = Fcons (lisp_node, Qnil); 4058 Lisp_Object this = Fcons (lisp_node, Qnil);
4059 Fsetcdr (parent, Fcons (this, Fcdr (parent))); 4059 Fsetcdr (parent, Fcons (this, Fcdr (parent)));