diff options
| author | Paul Eggert | 2015-09-23 14:43:26 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-09-23 14:44:35 -0700 |
| commit | 791355fd403eb1b9a73221e6ea586539ebdcb5e5 (patch) | |
| tree | 346b95ae78dd151e784d196c57bf577e00ecce7a | |
| parent | 20ff1b5cd96a548376fd7f70fa1da5c0060849cd (diff) | |
| download | emacs-791355fd403eb1b9a73221e6ea586539ebdcb5e5.tar.gz emacs-791355fd403eb1b9a73221e6ea586539ebdcb5e5.zip | |
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.
| -rw-r--r-- | src/macfont.m | 8 | ||||
| -rw-r--r-- | src/nsterm.m | 5 | ||||
| -rw-r--r-- | src/xterm.c | 6 |
3 files changed, 4 insertions, 15 deletions
diff --git a/src/macfont.m b/src/macfont.m index 23d272c9129..97a255bf018 100644 --- a/src/macfont.m +++ b/src/macfont.m | |||
| @@ -945,13 +945,7 @@ macfont_set_family_cache (Lisp_Object symbol, CFStringRef string) | |||
| 945 | Lisp_Object value; | 945 | Lisp_Object value; |
| 946 | 946 | ||
| 947 | if (!HASH_TABLE_P (macfont_family_cache)) | 947 | if (!HASH_TABLE_P (macfont_family_cache)) |
| 948 | { | 948 | macfont_family_cache = CALLN (Fmake_hash_table, QCtest, Qeq); |
| 949 | Lisp_Object args[2]; | ||
| 950 | |||
| 951 | args[0] = QCtest; | ||
| 952 | args[1] = Qeq; | ||
| 953 | macfont_family_cache = Fmake_hash_table (2, args); | ||
| 954 | } | ||
| 955 | 949 | ||
| 956 | h = XHASH_TABLE (macfont_family_cache); | 950 | h = XHASH_TABLE (macfont_family_cache); |
| 957 | i = hash_lookup (h, symbol, &hash); | 951 | i = hash_lookup (h, symbol, &hash); |
diff --git a/src/nsterm.m b/src/nsterm.m index 14f2beb4489..7c6b9dc1744 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -440,10 +440,7 @@ append2 (Lisp_Object list, Lisp_Object item) | |||
| 440 | Utility to append to a list | 440 | Utility to append to a list |
| 441 | -------------------------------------------------------------------------- */ | 441 | -------------------------------------------------------------------------- */ |
| 442 | { | 442 | { |
| 443 | Lisp_Object array[2]; | 443 | return CALLN (Fnconc, list, list1 (item)); |
| 444 | array[0] = list; | ||
| 445 | array[1] = list1 (item); | ||
| 446 | return Fnconc (2, &array[0]); | ||
| 447 | } | 444 | } |
| 448 | 445 | ||
| 449 | 446 | ||
diff --git a/src/xterm.c b/src/xterm.c index 13e1902a0bb..dd54552510c 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) | |||
| 575 | cairo_t *cr; | 575 | cairo_t *cr; |
| 576 | int width, height; | 576 | int width, height; |
| 577 | void (*surface_set_size_func) (cairo_surface_t *, double, double) = NULL; | 577 | void (*surface_set_size_func) (cairo_surface_t *, double, double) = NULL; |
| 578 | Lisp_Object acc = Qnil, args[2]; | 578 | Lisp_Object acc = Qnil; |
| 579 | int count = SPECPDL_INDEX (); | 579 | int count = SPECPDL_INDEX (); |
| 580 | 580 | ||
| 581 | Fredisplay (Qt); | 581 | Fredisplay (Qt); |
| @@ -659,9 +659,7 @@ x_cr_export_frames (Lisp_Object frames, cairo_surface_type_t surface_type) | |||
| 659 | #endif | 659 | #endif |
| 660 | unbind_to (count, Qnil); | 660 | unbind_to (count, Qnil); |
| 661 | 661 | ||
| 662 | args[0] = intern ("concat"); | 662 | return CALLN (Fapply, intern ("concat"), Fnreverse (acc)); |
| 663 | args[1] = Fnreverse (acc); | ||
| 664 | return Fapply (2, args); | ||
| 665 | } | 663 | } |
| 666 | 664 | ||
| 667 | #endif /* USE_CAIRO */ | 665 | #endif /* USE_CAIRO */ |