digraphs/xorg: support keysymdef aliases in compose definitions
[sheet.git] / tools / mkdigraphs-xorg
index b34bef562dda161cd54e51b751b69cb7fc5805df..90b0d8603ac9f1790eb46641288575eaf41b06af 100755 (executable)
@@ -23,7 +23,10 @@ while ($_ = readline) {
                or next;
        $chr =~ s/\\(.)/$1/g;
        $mnem !~ m/<dead | <KP_ | <U[0-9A-Fa-f]{4}/ or next;  # skip non-standard keys
-       $mnem =~ s{<([^>]+)> \h?}{$symname->{$1} // die "reference to unknown keysym $1\n"}eg;
+       eval {
+               $mnem =~ s{<([^>]+)> \h?}{$symname->{$1} // die "reference to unknown keysym $1\n"}eg;
+               1;
+       } or warn($@), next;
        $mnem !~ m/[^\x20-\x7F]/ or next;  # skip unicode
 #      (state $seen = {})->{$chr}++ and next;
        printf "%s => %s,\n", pp($mnem), pp($chr);