]> git.eshelyaron.com Git - emacs.git/commitdiff
Prefer calln to CALLN where applicable
authorStefan Kangas <stefankangas@gmail.com>
Mon, 13 Jan 2025 23:16:40 +0000 (00:16 +0100)
committerEshel Yaron <me@eshelyaron.com>
Tue, 14 Jan 2025 08:49:24 +0000 (09:49 +0100)
* 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.

(cherry picked from commit 383de5c3f6f1ca7c8da7450d6e1716b43e9d2020)

src/callint.c
src/comp.c
src/data.c
src/eval.c
src/keymap.c
src/minibuf.c
src/pdumper.c
src/print.c
src/treesit.c

index 075f5542f906f44cc8c491f4fbadaf873bc18822..ca6e8fe1512a52dbca5d42a7c3f3c635cf04bd74 100644 (file)
@@ -228,7 +228,7 @@ static Lisp_Object
 read_file_name (Lisp_Object default_filename, Lisp_Object mustmatch,
                Lisp_Object initial, Lisp_Object predicate)
 {
-  return CALLN (Ffuncall, Qread_file_name,
+  return calln (Qread_file_name,
                callint_message, Qnil, default_filename,
                mustmatch, initial, predicate);
 }
index b96fae4ae955fb48e05ef0ea78198718b3ccde07..8b56bcf0257ad64ab93658ea05a2932f5d560757 100644 (file)
@@ -504,19 +504,19 @@ load_gccjit_if_necessary (bool mandatory)
 
 /* Like call0 but stringify and intern.  */
 #define CALL0I(fun)                            \
-  CALLN (Ffuncall, intern_c_string (STR (fun)))
+  calln (intern_c_string (STR (fun)))
 
 /* Like call1 but stringify and intern.  */
 #define CALL1I(fun, arg)                               \
-  CALLN (Ffuncall, intern_c_string (STR (fun)), arg)
+  calln (intern_c_string (STR (fun)), arg)
 
 /* Like call2 but stringify and intern.  */
 #define CALL2I(fun, arg1, arg2)                                \
-  CALLN (Ffuncall, intern_c_string (STR (fun)), arg1, arg2)
+  calln (intern_c_string (STR (fun)), arg1, arg2)
 
 /* Like call4 but stringify and intern.  */
 #define CALL4I(fun, arg1, arg2, arg3, arg4)                            \
-  CALLN (Ffuncall, intern_c_string (STR (fun)), arg1, arg2, arg3, arg4)
+  calln (intern_c_string (STR (fun)), arg1, arg2, arg3, arg4)
 
 #define DECL_BLOCK(name, func)                         \
   gcc_jit_block *(name) =                              \
@@ -1016,7 +1016,7 @@ declare_imported_func (Lisp_Object subr_sym, gcc_jit_type *ret_type,
 
   /* String containing the function ptr name.  */
   Lisp_Object f_ptr_name =
-    CALLN (Ffuncall, intern_c_string ("comp-c-func-name"),
+    calln (intern_c_string ("comp-c-func-name"),
           subr_sym, make_string ("R", 1));
 
   gcc_jit_type *f_ptr_type =
index bbe14c83dfb36404319a3cdaa5d290ae1bdccf0b..be85f817014c4abe93e9411e0034ebfbbdfeaa1a 100644 (file)
@@ -911,7 +911,7 @@ signal a `cyclic-function-indirection' error.  */)
   if (!NILP (Vnative_comp_enable_subr_trampolines)
       && SUBRP (function)
       && !NATIVE_COMP_FUNCTIONP (function))
-    CALLN (Ffuncall, Qcomp_subr_trampoline_install, symbol);
+    calln (Qcomp_subr_trampoline_install, symbol);
 #endif
 
   set_symbol_function (symbol, definition);
@@ -1910,7 +1910,7 @@ notify_variable_watchers (Lisp_Object symbol,
           funcall_subr (XSUBR (watcher), ARRAYELTS (args), args);
         }
       else
-        CALLN (Ffuncall, watcher, symbol, newval, operation, where);
+        calln (watcher, symbol, newval, operation, where);
     }
 
   unbind_to (count, Qnil);
index a73700419dd5c7c425b41dd56abb1329ea1a11bc..b0cc2505a35497be657ca2e2f617d5e35db9f16d 100644 (file)
@@ -1169,7 +1169,7 @@ is not displayed.  */)
                                       xstrdup (SSDATA (message)));
   record_unwind_protect_ptr (with_delayed_message_cancel, timer);
 
-  Lisp_Object result = CALLN (Ffuncall, function);
+  Lisp_Object result = calln (function);
 
   return unbind_to (count, result);
 }
index 5c0ddcd1d9d52c73d1676226b9e69a864a77e4b8..9ff0b52df727bdac79a7395c3e29bdc2fb813e9b 100644 (file)
@@ -2894,8 +2894,7 @@ You type        Translation\n\
   if (!NILP (Vkey_translation_map))
     {
       Lisp_Object msg = build_unibyte_string ("Key translations");
-      CALLN (Ffuncall,
-            Qhelp__describe_map_tree,
+      calln (Qhelp__describe_map_tree,
             Vkey_translation_map, Qnil, Qnil, prefix,
             msg, nomenu, Qt, Qnil, Qnil, buffer);
     }
@@ -2908,8 +2907,7 @@ You type        Translation\n\
   if (!NILP (start1))
     {
       Lisp_Object msg = build_unibyte_string ("\f\nOverriding Bindings");
-      CALLN (Ffuncall,
-            Qhelp__describe_map_tree,
+      calln (Qhelp__describe_map_tree,
             start1, Qt, shadow, prefix,
             msg, nomenu, Qnil, Qnil, Qnil, buffer);
       shadow = Fcons (start1, shadow);
@@ -2921,8 +2919,7 @@ You type        Translation\n\
   if (!NILP (start1))
     {
       Lisp_Object msg = build_unibyte_string ("\f\nOverriding Bindings");
-      CALLN (Ffuncall,
-            Qhelp__describe_map_tree,
+      calln (Qhelp__describe_map_tree,
             start1, Qt, shadow, prefix,
             msg, nomenu, Qnil, Qnil, Qnil, buffer);
       shadow = Fcons (start1, shadow);
@@ -2944,8 +2941,7 @@ You type        Translation\n\
       if (!NILP (start1))
        {
          Lisp_Object msg = build_unibyte_string ("\f\n`keymap' Property Bindings");
-         CALLN (Ffuncall,
-                Qhelp__describe_map_tree,
+         calln (Qhelp__describe_map_tree,
                 start1, Qt, shadow, prefix,
                 msg, nomenu, Qnil, Qnil, Qnil, buffer);
          shadow = Fcons (start1, shadow);
@@ -2977,8 +2973,7 @@ You type        Translation\n\
          *p = 0;
 
          Lisp_Object msg = build_unibyte_string (title);
-         CALLN (Ffuncall,
-                Qhelp__describe_map_tree,
+         calln (Qhelp__describe_map_tree,
                 maps[i], Qt, shadow, prefix,
                 msg, nomenu, Qnil, Qnil, Qnil, buffer);
          shadow = Fcons (maps[i], shadow);
@@ -2995,16 +2990,14 @@ You type        Translation\n\
                CALLN (Fformat,
                       build_unibyte_string ("\f\n`%s' Major Mode Bindings"),
                       XBUFFER (buffer)->major_mode_);
-             CALLN (Ffuncall,
-                    Qhelp__describe_map_tree,
+             calln (Qhelp__describe_map_tree,
                     start1, Qt, shadow, prefix,
                     msg, nomenu, Qnil, Qnil, Qnil, buffer);
            }
          else
            {
              Lisp_Object msg = build_unibyte_string ("\f\n`local-map' Property Bindings");
-             CALLN (Ffuncall,
-                    Qhelp__describe_map_tree,
+             calln (Qhelp__describe_map_tree,
                     start1, Qt, shadow, prefix,
                     msg, nomenu, Qnil, Qnil, Qnil, buffer);
            }
@@ -3014,8 +3007,7 @@ You type        Translation\n\
     }
 
   Lisp_Object msg = build_unibyte_string ("\f\nGlobal Bindings");
-  CALLN (Ffuncall,
-        Qhelp__describe_map_tree,
+  calln (Qhelp__describe_map_tree,
         current_global_map, Qt, shadow, prefix,
         msg, nomenu, Qnil, Qt, Qnil, buffer);
 
@@ -3023,8 +3015,7 @@ You type        Translation\n\
   if (!NILP (KVAR (current_kboard, Vlocal_function_key_map)))
     {
       Lisp_Object msg = build_unibyte_string ("\f\nFunction key map translations");
-      CALLN (Ffuncall,
-            Qhelp__describe_map_tree,
+      calln (Qhelp__describe_map_tree,
             KVAR (current_kboard, Vlocal_function_key_map), Qnil, Qnil, prefix,
             msg, nomenu, Qt, Qnil, Qnil, buffer);
     }
@@ -3033,8 +3024,7 @@ You type        Translation\n\
   if (!NILP (KVAR (current_kboard, Vinput_decode_map)))
     {
       Lisp_Object msg = build_unibyte_string ("\f\nInput decoding map translations");
-      CALLN (Ffuncall,
-            Qhelp__describe_map_tree,
+      calln (Qhelp__describe_map_tree,
             KVAR (current_kboard, Vinput_decode_map), Qnil, Qnil, prefix,
             msg, nomenu, Qt, Qnil, Qnil, buffer);
     }
index 4ac2781456ea3285bba9592dd676a7d72a3cdd66..d1056d7f12c16512daf43b72444631fbaae916ae 100644 (file)
@@ -1478,8 +1478,7 @@ behavior.  */)
                                              STRING_MULTIBYTE (prompt));
            }
 
-         prompt = CALLN (Ffuncall, Qformat_prompt,
-                         prompt,
+         prompt = calln (Qformat_prompt, prompt,
                          CONSP (def) ? XCAR (def) : def);
        }
 
@@ -1921,8 +1920,7 @@ Completion ignores case if the ambient value of
 See also `completing-read-function'.  */)
   (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)
 {
-  return CALLN (Ffuncall,
-               Fsymbol_value (Qcompleting_read_function),
+  return calln (Fsymbol_value (Qcompleting_read_function),
                prompt, collection, predicate, require_match, initial_input,
                hist, def, inherit_input_method);
 }
index 7d6eabb4b15051be6e0396287cc5ad8f429444e7..97d3d1412b750fade0faea21754b8add1908afee 100644 (file)
@@ -4156,7 +4156,7 @@ types.  */)
     error ("No other Lisp threads can be running when this function is called");
 
 #ifdef HAVE_NATIVE_COMP
-  CALLN (Ffuncall, intern_c_string ("load--fixup-all-elns"));
+  calln (intern_c_string ("load--fixup-all-elns"));
 #endif
 
   check_pure_size ();
index 4694df98882b3e5311163ae8789573088fcabf7e..f3814859cb3dacfa881bede3cc769d7062cee78a 100644 (file)
@@ -1680,8 +1680,7 @@ print_vectorlike_unreadable (Lisp_Object obj, Lisp_Object printcharfun,
          record_unwind_current_buffer ();
          set_buffer_internal (XBUFFER (Vprint__unreadable_callback_buffer));
        }
-      Lisp_Object result = CALLN (Ffuncall, func, obj,
-                                 escapeflag? Qt: Qnil);
+      Lisp_Object result = calln (func, obj, escapeflag? Qt: Qnil);
       unbind_to (count, Qnil);
 
       if (!NILP (result))
index 918b1a510eaf7dea715eebfbc9ba08a1938725ff..439109e72db17e449932040cd826c309e8212044 100644 (file)
@@ -3730,7 +3730,7 @@ treesit_traverse_match_predicate (TSTreeCursor *cursor, Lisp_Object pred,
           && !(SYMBOLP (pred) && !NILP (Fget (pred, Qtreesit_thing_symbol))))
     {
       Lisp_Object lisp_node = make_treesit_node (parser, node);
-      return !NILP (CALLN (Ffuncall, pred, lisp_node));
+      return !NILP (calln (pred, lisp_node));
     }
   else if (SYMBOLP (pred) && BASE_EQ (pred, Qnamed))
     {
@@ -3784,7 +3784,7 @@ treesit_traverse_match_predicate (TSTreeCursor *cursor, Lisp_Object pred,
            return false;
 
          Lisp_Object lisp_node = make_treesit_node (parser, node);
-         if (NILP (CALLN (Ffuncall, cdr, lisp_node)))
+         if (NILP (calln (cdr, lisp_node)))
            return false;
 
          return true;
@@ -4053,7 +4053,7 @@ treesit_build_sparse_tree (TSTreeCursor *cursor, Lisp_Object parent,
       TSNode node = ts_tree_cursor_current_node (cursor);
       Lisp_Object lisp_node = make_treesit_node (parser, node);
       if (!NILP (process_fn))
-       lisp_node = CALLN (Ffuncall, process_fn, lisp_node);
+       lisp_node = calln (process_fn, lisp_node);
 
       Lisp_Object this = Fcons (lisp_node, Qnil);
       Fsetcdr (parent, Fcons (this, Fcdr (parent)));