diff options
| author | Mattias EngdegÄrd | 2023-09-07 11:25:46 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2023-09-07 17:55:09 +0200 |
| commit | 7c55bf59bb77d1dddbf32d716655de8f98444df4 (patch) | |
| tree | b471f865d2b0d897e77188e28e06f7c664c1ad15 | |
| parent | a412d3c46cc4e53a78793dd4e129918452516caa (diff) | |
| download | emacs-7c55bf59bb77d1dddbf32d716655de8f98444df4.tar.gz emacs-7c55bf59bb77d1dddbf32d716655de8f98444df4.zip | |
* 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.
| -rw-r--r-- | admin/unidata/emoji-zwj.awk | 8 |
1 files 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 { | |||
| 100 | vec[codepoint] = vec[codepoint] "\n\"\\N{U+" trigger_codepoints[trig] "}\\N{U+FE0F}\"" | 100 | vec[codepoint] = vec[codepoint] "\n\"\\N{U+" trigger_codepoints[trig] "}\\N{U+FE0F}\"" |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | print "(dolist (elt `(" | 103 | print "(dolist (elt (eval-when-compile `(" |
| 104 | 104 | ||
| 105 | for (elt in ch) | 105 | for (elt in ch) |
| 106 | { | 106 | { |
| 107 | print "(#x" elt " .\n,(eval-when-compile (regexp-opt\n'(\n" vec[elt] | 107 | print "(#x" elt " .\n,(regexp-opt\n'(\n" vec[elt] |
| 108 | print "\"\\N{U+" elt "}\\N{U+FE0E}\"\n\"\\N{U+" elt "}\\N{U+FE0F}\"\n))))" | 108 | print "\"\\N{U+" elt "}\\N{U+FE0E}\"\n\"\\N{U+" elt "}\\N{U+FE0F}\"\n)))" |
| 109 | } | 109 | } |
| 110 | print "))" | 110 | print ")))" |
| 111 | print " (set-char-table-range composition-function-table" | 111 | print " (set-char-table-range composition-function-table" |
| 112 | print " (car elt)" | 112 | print " (car elt)" |
| 113 | print " (nconc (char-table-range composition-function-table (car elt))" | 113 | print " (nconc (char-table-range composition-function-table (car elt))" |