Commit 44ab9cc3 authored by MORIOKA Tomohiko's avatar MORIOKA Tomohiko
Browse files

Require `chiset-common' instead of `cwiki-common'.

(chise-turtle-feature-domains): Moved to chiset-common.el.
(charset-code-point-format-spec): Ditto.
(chise-turtle-uri-decode-feature-name): Ditto.
(chise-turtle-uri-encode-ccs-name): Ditto.
(chise-turtle-format-ccs-code-point): Ditto.
(chise-turtle-encode-char): Ditto.
parent a2dbb512
......@@ -25,7 +25,7 @@
;;; Code:
(require 'char-db-util)
(require 'cwiki-common)
(require 'chiset-common)
(require 'isd-turtle)
(require 'ideograph-util)
......@@ -175,8 +175,7 @@
(defvar chise-turtle-ccs-prefix-alist nil)
(defvar chise-turtle-feature-domains)
(setq chise-turtle-feature-domains
(append char-db-feature-domains
(let (dest domain)
......@@ -190,59 +189,6 @@
(setq dest (cons domain dest)))))
(sort dest #'string<))))
(defun charset-code-point-format-spec (ccs)
(cond ((memq ccs '(=ucs))
(let ((ccs-name (symbol-name ccs)))
((string-match "\\(hanyo-denshi/ks\\|koseki\\|mj\\)" ccs-name)
((string-match "hanyo-denshi/tk" ccs-name)
(defun chise-turtle-uri-decode-feature-name (uri-feature)
(cond ((string= "a.ucs" uri-feature)
((string= "a.big5" uri-feature)
(www-uri-decode-feature-name uri-feature))))
(defun chise-turtle-uri-encode-ccs-name (feature-name)
((eq '=ucs feature-name)
((eq '=big5 feature-name)
((eq '==>ucs@bucs feature-name)
(mapconcat (lambda (c)
((eq c ?@)
((eq c ?+)
((eq c ?=)
((eq c ?|)
(char-to-string c))))
(www-uri-encode-feature-name feature-name)
(defun chise-turtle-uri-encode-feature-name (feature-name)
((eq '->subsumptive feature-name)
......@@ -278,60 +224,6 @@
(concat ":" (chise-turtle-uri-encode-ccs-name feature-name)))))
(defun chise-turtle-format-ccs-code-point (ccs code-point)
(let ((ccs-uri (chise-turtle-uri-encode-ccs-name ccs)))
(unless (assoc ccs-uri chise-turtle-ccs-prefix-alist)
(setq chise-turtle-ccs-prefix-alist
(cons (cons ccs-uri ccs)
(format "%s:%s"
(format (charset-code-point-format-spec ccs)
(defun chise-turtle-encode-char (object)
(let (spec cell dest
ccs ret ret2)
(if (setq ret (encode-char object '=ucs))
(chise-turtle-format-ccs-code-point '=ucs ret)
(setq spec (char-attribute-alist object))
(while (and spec
(setq cell (pop spec)))
(if (and (find-charset (car cell))
(setq ret (cdr cell)))
(setq dest (cons cell dest))))
(setq ret (car (sort dest (lambda (a b)
(char-attribute-name< (car a)(car b)))))
ccs (car ret)
ret (cdr ret))
(cond (ret
(chise-turtle-format-ccs-code-point ccs ret)
((and (setq ccs (car (split-char object)))
(setq ret (encode-char object ccs)))
(chise-turtle-format-ccs-code-point ccs ret)
((setq ret (get-char-attribute object 'ideographic-combination))
(format "ideocomb:%s"
(mapconcat (lambda (cell)
(cond ((characterp cell)
(char-to-string cell)
((setq ret2 (find-char cell))
(char-to-string ret2)
(format "%S" cell)
ret ""))
(format (if est-hide-cgi-mode
(encode-char object 'system-char-id))
(defun concord-turtle-encode-object (obj)
(cond ((characterp obj)
(chise-turtle-encode-char obj)
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