lib/sekka/roman-lib.nnd in sekka-1.6.6 vs lib/sekka/roman-lib.nnd in sekka-1.7.0

- old
+ new

@@ -358,11 +358,11 @@ "cc" "cf")) ;; 子音が2音入ったテーブル (define sekka-kana->roman-alist-long - `( + '( ;; "n" 一つで "nn" を表現する件と被るのでAZIK専用拡張とする(エントリ上書き) ("にゃ" "nya" "nga") ("にゅ" "nyu" "ngu") ("にぇ" "nye" "nge") ("にょ" "nyo" "ngo") @@ -709,15 +709,22 @@ (define sekka-kana->roman-hash-long-no-azik sekka-kana->roman-hash-short-no-azik) ;; ハッシュテーブル ローマ字 =>平仮名 (define (sekka-alist-swap alist) - (append-map - (lambda (x) - (let ((hira (car x)) - (romans (cdr x))) - (map (lambda (r) (list r hira)) romans))) - alist)) + (let1 mapped (map + (lambda (x) + (let ((hira (car x)) + (romans (cdr x))) + (map (lambda (r) (list r hira)) romans))) + alist) + (let1 lst '() + (for-each + (lambda (x) + (for-each (lambda (y) (push! lst y)) (reverse x))) + mapped) + (reverse lst)))) + (define sekka-roman->kana-hash-short (alist->hash-table (sekka-alist-swap sekka-kana->roman-alist-short))) (define sekka-roman->kana-hash-long (alist->hash-table (sekka-alist-swap (append