]> git.eshelyaron.com Git - emacs.git/commitdiff
Replace unneeded sprintfs with print
authorRobert Pluim <rpluim@gmail.com>
Mon, 5 Jun 2023 11:12:08 +0000 (13:12 +0200)
committerRobert Pluim <rpluim@gmail.com>
Tue, 13 Jun 2023 12:43:18 +0000 (14:43 +0200)
* admin/unidata/emoji-zwj.awk: Printing strings doesn't need sprintf,
so just use print and string concatenation.

admin/unidata/emoji-zwj.awk

index 4b648aa675ebf60e0b8a779c06f7fbdf932667f9..53170214d8aebfd5d08dff613636febd89bec7fc 100644 (file)
@@ -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"