Commit ce7e9fde authored by MORIOKA Tomohiko's avatar MORIOKA Tomohiko
Browse files

(chise-json-char-get-info): In the sort of "radical-and-strokes", put

"chise:domain/common" at the end.
parent 00181cba
......@@ -2451,40 +2451,48 @@
(setq dest
(cons (cons
'radical-and-strokes
(mapcar (lambda (cell)
(setq domain
(format "chise:domain/%s" (or (car cell) 'common)))
(setq cell (cdr cell))
(setq kangxi-radical
(or (assq 'kangxi-radical-number cell)
(assq 'kangxi-radical-number
(cdr (assq nil radical-strokes-spec)))))
(setq kangxi-strokes
(or (assq 'kangxi-strokes cell)
(assq 'kangxi-strokes
(cdr (assq nil radical-strokes-spec)))))
(setq total-strokes
(or (assq 'total-strokes cell)
(assq 'total-strokes
(cdr (assq nil radical-strokes-spec)))))
(setq cell
(del-alist 'kangxi-radical-number
(del-alist 'kangxi-strokes
(del-alist 'total-strokes cell))))
(if total-strokes
(setq cell (cons total-strokes cell)))
(if kangxi-strokes
(setq cell (cons kangxi-strokes cell)))
(when kangxi-radical
(setq cell
(list*
(cons 'kangxi-radical
(char-to-string
(ideographic-radical (cdr kangxi-radical))))
kangxi-radical
cell)))
(cons domain cell))
radical-strokes-spec))
(sort
(mapcar (lambda (cell)
(setq domain
(intern
(format "chise:domain/%s" (or (car cell) 'common))))
(setq cell (cdr cell))
(setq kangxi-radical
(or (assq 'kangxi-radical-number cell)
(assq 'kangxi-radical-number
(cdr (assq nil radical-strokes-spec)))))
(setq kangxi-strokes
(or (assq 'kangxi-strokes cell)
(assq 'kangxi-strokes
(cdr (assq nil radical-strokes-spec)))))
(setq total-strokes
(or (assq 'total-strokes cell)
(assq 'total-strokes
(cdr (assq nil radical-strokes-spec)))))
(setq cell
(del-alist 'kangxi-radical-number
(del-alist 'kangxi-strokes
(del-alist 'total-strokes cell))))
(if total-strokes
(setq cell (cons total-strokes cell)))
(if kangxi-strokes
(setq cell (cons kangxi-strokes cell)))
(when kangxi-radical
(setq cell
(list*
(cons 'kangxi-radical
(char-to-string
(ideographic-radical (cdr kangxi-radical))))
kangxi-radical
cell)))
(cons domain cell))
radical-strokes-spec)
(lambda (a b)
(if (eq (car a) 'chise:domain/common)
nil
(if (eq (car b) 'chise:domain/common)
t
(string< (car a)(car b)))))))
dest)))
(dolist (cell (sort parents-spec
(lambda (a b)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment