From: Robert Pluim Date: Mon, 5 Jun 2023 11:12:08 +0000 (+0200) Subject: Replace unneeded sprintfs with print X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0485955f5aa98d1864ae9441c7133351e265ab2a;p=emacs.git Replace unneeded sprintfs with print * admin/unidata/emoji-zwj.awk: Printing strings doesn't need sprintf, so just use print and string concatenation. --- diff --git a/admin/unidata/emoji-zwj.awk b/admin/unidata/emoji-zwj.awk index 4b648aa675e..53170214d8a 100644 --- a/admin/unidata/emoji-zwj.awk +++ b/admin/unidata/emoji-zwj.awk @@ -83,31 +83,29 @@ END { trigger_codepoints[12] = "1F575" trigger_codepoints[13] = "1F590" - printf "(setq auto-composition-emoji-eligible-codepoints\n" - printf "'(" + print "(setq auto-composition-emoji-eligible-codepoints" + print "'(" for (trig in trigger_codepoints) { - printf("\n?\\N{U+%s}", trigger_codepoints[trig]) + print "?\\N{U+" trigger_codepoints[trig] "}" } - printf "\n))\n\n" + print "))" # We add entries for 'codepoint U+FE0F' here to ensure that the # code in font_range is triggered. for (trig in trigger_codepoints) { - codepoint = trigger_codepoints[trig] - c = sprintf("\\N{U+%s}", codepoint) - vec[codepoint] = vec[codepoint] "\n\"" c "\\N{U+FE0F}\"" + vec[codepoint] = vec[codepoint] "\n\"\\N{U+" trigger_codepoints[trig] "}\\N{U+FE0F}\"" } print "(dolist (elt `(" for (elt in ch) { - entries = vec[elt] sprintf("\n\"\\N{U+%s}\\N{U+FE0E}\"\n\"\\N{U+%s}\\N{U+FE0F}\"", elt, elt) - printf("(#x%s .\n,(eval-when-compile (regexp-opt\n'(\n%s\n))))\n", elt, entries) + print "(#x" elt " .\n,(eval-when-compile (regexp-opt\n'(\n" vec[elt] + print "\"\\N{U+" elt "}\\N{U+FE0E}\"\n\"\\N{U+" elt "}\\N{U+FE0F}\"\n))))" } print "))" print " (set-char-table-range composition-function-table"