[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 791355f: Prefer CALLN in a few more places
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 791355f: Prefer CALLN in a few more places |
Date: |
Wed, 23 Sep 2015 21:44:43 +0000 |
branch: master
commit 791355fd403eb1b9a73221e6ea586539ebdcb5e5
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Prefer CALLN in a few more places
* 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 | 8 +-------
src/nsterm.m | 5 +----
src/xterm.c | 6 ++----
3 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/src/macfont.m b/src/macfont.m
index 23d272c..97a255b 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -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);
diff --git a/src/nsterm.m b/src/nsterm.m
index 14f2beb..7c6b9dc 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -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));
}
diff --git a/src/xterm.c b/src/xterm.c
index 13e1902..dd54552 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -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 */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 791355f: Prefer CALLN in a few more places,
Paul Eggert <=