From 7c55bf59bb77d1dddbf32d716655de8f98444df4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Thu, 7 Sep 2023 11:25:46 +0200 Subject: [PATCH] * admin/unidata/emoji-zwj.awk: More efficient code generation Hoist the `eval-when-compile` to encompass the entire list, since backquote forms aren't automatically evaluated at compile time. This results in a single constant list in the generated code, and much less actual code. --- admin/unidata/emoji-zwj.awk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/unidata/emoji-zwj.awk b/admin/unidata/emoji-zwj.awk index 53170214d8a..fc4a2edd559 100644 --- a/admin/unidata/emoji-zwj.awk +++ b/admin/unidata/emoji-zwj.awk @@ -100,14 +100,14 @@ END { vec[codepoint] = vec[codepoint] "\n\"\\N{U+" trigger_codepoints[trig] "}\\N{U+FE0F}\"" } - print "(dolist (elt `(" + print "(dolist (elt (eval-when-compile `(" for (elt in ch) { - 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 "(#x" elt " .\n,(regexp-opt\n'(\n" vec[elt] + print "\"\\N{U+" elt "}\\N{U+FE0E}\"\n\"\\N{U+" elt "}\\N{U+FE0F}\"\n)))" } - print "))" + print ")))" print " (set-char-table-range composition-function-table" print " (car elt)" print " (nconc (char-table-range composition-function-table (car elt))" -- 2.39.5