]> code.delx.au - gnu-emacs/commitdiff
Prefer CALLN in a few more places
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 23 Sep 2015 21:43:26 +0000 (14:43 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 23 Sep 2015 21:44:35 +0000 (14:44 -0700)
* src/macfont.m (macfont_set_family_cache):
* src/nsterm.m (append2):
* src/xterm.c (x_cr_export_frames):
Prefer CALLN to allocating the arg arrays by hand.

src/macfont.m
src/nsterm.m
src/xterm.c

index 23d272c91298ced6a76c12c9a6dfe072e6c89c81..97a255bf018395806f44a7728071d285a8b6a7c2 100644 (file)
@@ -945,13 +945,7 @@ macfont_set_family_cache (Lisp_Object symbol, CFStringRef string)
   Lisp_Object value;
 
   if (!HASH_TABLE_P (macfont_family_cache))
-    {
-      Lisp_Object args[2];
-
-      args[0] = QCtest;
-      args[1] = Qeq;
-      macfont_family_cache = Fmake_hash_table (2, args);
-    }
+    macfont_family_cache = CALLN (Fmake_hash_table, QCtest, Qeq);
 
   h = XHASH_TABLE (macfont_family_cache);
   i = hash_lookup (h, symbol, &hash);
index 14f2beb44894c7671a69410bc551430056c3dc7f..7c6b9dc174410044b9ffbeb01f19a257398a7952 100644 (file)
@@ -440,10 +440,7 @@ append2 (Lisp_Object list, Lisp_Object item)
    Utility to append to a list
    -------------------------------------------------------------------------- */
 {
-  Lisp_Object array[2];
-  array[0] = list;
-  array[1] = list1 (item);
-  return Fnconc (2, &array[0]);
+  return CALLN (Fnconc, list, list1 (item));
 }
 
 
index 13e1902a0bb6d8992eab5f00d1428f7ca65f7d45..dd54552510c9b336e88fdbbaac53b32eeaeed46c 100644 (file)
@@ -575,7 +575,7 @@ x_cr_export_frames (Lisp_Object frames, cairo_surface_type_t surface_type)
   cairo_t *cr;
   int width, height;
   void (*surface_set_size_func) (cairo_surface_t *, double, double) = NULL;
-  Lisp_Object acc = Qnil, args[2];
+  Lisp_Object acc = Qnil;
   int count = SPECPDL_INDEX ();
 
   Fredisplay (Qt);
@@ -659,9 +659,7 @@ x_cr_export_frames (Lisp_Object frames, cairo_surface_type_t surface_type)
 #endif
   unbind_to (count, Qnil);
 
-  args[0] = intern ("concat");
-  args[1] = Fnreverse (acc);
-  return Fapply (2, args);
+  return CALLN (Fapply, intern ("concat"), Fnreverse (acc));
 }
 
 #endif /* USE_CAIRO */