Require `chiset-common' instead of `cwiki-common'.
authorMORIOKA Tomohiko <tomo.git@chise.org>
Sat, 15 Dec 2018 08:22:41 +0000 (17:22 +0900)
committerMORIOKA Tomohiko <tomo.git@chise.org>
Sat, 15 Dec 2018 08:22:41 +0000 (17:22 +0900)
(est-coded-charset-priority-list): Abolished.
(isd-turtle-encode-char): Abolished.
(isd-turtle-format-component): Use `chise-turtle-encode-char' instead
of `isd-turtle-encode-char'.

isd-turtle.el

index 93fea22..d85dfe7 100644 (file)
 
 ;;; Code:
 
-(require 'cwiki-common)
+(require 'chiset-common)
 
 (defvar isd-url-prefix "http://rdf.chise.org/data/")
 
-(setq est-coded-charset-priority-list
-  '(; =ucs
-    =mj
-    =adobe-japan1-0
-    =adobe-japan1-1
-    =adobe-japan1-2
-    =adobe-japan1-3
-    =adobe-japan1-4
-    =adobe-japan1-5
-    =adobe-japan1-6
-    =ucs@iso
-    =jis-x0208 =jis-x0208@1990
-    =jis-x0213-1
-    =jis-x0213-1@2000 =jis-x0213-1@2004
-    =jis-x0213-2
-    =jis-x0212
-    =gt
-    =hanyo-denshi/ks
-    =hanyo-denshi/tk
-    =ucs-itaiji-001
-    =ucs-itaiji-002
-    =ucs-itaiji-003
-    =ucs-itaiji-004
-    =ucs-itaiji-005
-    =ucs-itaiji-006
-    =ucs-itaiji-007
-    =ucs-itaiji-008
-    =ucs-itaiji-009
-    =ucs-itaiji-010
-    =ucs-itaiji-084
-    =ucs-var-001
-    =ucs-var-002
-    =ucs-var-003
-    =ucs-var-004
-    =ucs-var-005
-    =cns11643-1 =cns11643-2 =cns11643-3
-    =cns11643-4 =cns11643-5 =cns11643-6 =cns11643-7
-    =gb2312
-    =big5-cdp
-    =ks-x1001
-    =gt-k
-    =ucs@unicode
-    =ucs@JP/hanazono
-    =gb12345
-    =ucs@cns
-    =ucs@gb
-    =zinbun-oracle =>zinbun-oracle
-    =daikanwa
-    =ruimoku-v6
-    =cbeta =jef-china3
-    =daikanwa/+2p
-    =+>ucs@iso =+>ucs@unicode
-    =+>ucs@jis
-    =+>ucs@cns
-    =+>ucs@ks
-    =+>ucs@jis/1990
-    =>mj
-    =>jis-x0208 =>jis-x0213-1
-    =>jis-x0208@1997
-    =>ucs@iwds-1
-    =>ucs@cognate
-    =>ucs@component
-    =>iwds-1
-    =>ucs@iso
-    =>ucs@unicode
-    =>ucs@jis =>ucs@cns =>ucs@ks
-    =>gt
-    =>gt-k
-    =>>ucs@iso =>>ucs@unicode
-    =>>ucs@jis =>>ucs@cns =>>ucs@ks
-    =>>gt-k
-    =>>hanyo-denshi/ks
-    ==mj
-    ==ucs@iso
-    ==ucs@unicode
-    ==adobe-japan1-0
-    ==adobe-japan1-1
-    ==adobe-japan1-2
-    ==adobe-japan1-3
-    ==adobe-japan1-4
-    ==adobe-japan1-5
-    ==adobe-japan1-6
-    ==ks-x1001
-    ==hanyo-denshi/ks
-    ==hanyo-denshi/tk
-    ==ucs@jis
-    ==gt
-    ==cns11643-1 ==cns11643-2 ==cns11643-3
-    ==cns11643-4 ==cns11643-5 ==cns11643-6 ==cns11643-7
-    ==jis-x0212
-    ==ucs@cns
-    ==koseki
-    ==daikanwa
-    ==gt-k
-    ==ucs@gb
-    ==ucs-itaiji-003
-    ==ucs@JP/hanazono
-    ==daikanwa/+2p
-    =>>jis-x0208 =>>jis-x0213-1 =>>jis-x0213-2
-    =+>jis-x0208 =+>jis-x0213-1 =+>jis-x0213-2
-    =+>hanyo-denshi/jt
-    =+>jis-x0208@1978
-    =>>gt
-    =+>adobe-japan1
-    =>>adobe-japan1
-    =jis-x0208@1983 =jis-x0208@1978
-    =>ucs-itaiji-001
-    =>ucs-itaiji-002
-    =>ucs-itaiji-003
-    =>ucs-itaiji-004
-    =>ucs-itaiji-005
-    =>ucs-itaiji-006
-    =>ucs-itaiji-007
-    =>ucs-itaiji-009
-    ==>ucs@bucs
-    =big5
-    =>cbeta
-    ===mj
-    ===ucs@iso
-    ===ucs@unicode
-    ===hanyo-denshi/ks
-    ===ks-x1001
-    ===gt
-    ===gt-k
-    ===ucs@ks
-    ===ucs@gb
-    =shinjigen
-    =shinjigen@rev
-    =shinjigen@1ed
-    =shinjigen/+p@rev
-    ==shinjigen
-    ==shinjigen@rev
-    ==daikanwa/+p
-    ==shinjigen@1ed
-    ===daikanwa/+p
-    =>daikanwa/ho
-    ===daikanwa/ho
-    ))
+;; (setq est-coded-charset-priority-list
+;;   '(; =ucs
+;;     =mj
+;;     =adobe-japan1-0
+;;     =adobe-japan1-1
+;;     =adobe-japan1-2
+;;     =adobe-japan1-3
+;;     =adobe-japan1-4
+;;     =adobe-japan1-5
+;;     =adobe-japan1-6
+;;     =ucs@iso
+;;     =jis-x0208 =jis-x0208@1990
+;;     =jis-x0213-1
+;;     =jis-x0213-1@2000 =jis-x0213-1@2004
+;;     =jis-x0213-2
+;;     =jis-x0212
+;;     =gt
+;;     =hanyo-denshi/ks
+;;     =hanyo-denshi/tk
+;;     =ucs-itaiji-001
+;;     =ucs-itaiji-002
+;;     =ucs-itaiji-003
+;;     =ucs-itaiji-004
+;;     =ucs-itaiji-005
+;;     =ucs-itaiji-006
+;;     =ucs-itaiji-007
+;;     =ucs-itaiji-008
+;;     =ucs-itaiji-009
+;;     =ucs-itaiji-010
+;;     =ucs-itaiji-084
+;;     =ucs-var-001
+;;     =ucs-var-002
+;;     =ucs-var-003
+;;     =ucs-var-004
+;;     =ucs-var-005
+;;     =cns11643-1 =cns11643-2 =cns11643-3
+;;     =cns11643-4 =cns11643-5 =cns11643-6 =cns11643-7
+;;     =gb2312
+;;     =big5-cdp
+;;     =ks-x1001
+;;     =gt-k
+;;     =ucs@unicode
+;;     =ucs@JP/hanazono
+;;     =gb12345
+;;     =ucs@cns
+;;     =ucs@gb
+;;     =zinbun-oracle =>zinbun-oracle
+;;     =daikanwa
+;;     =ruimoku-v6
+;;     =cbeta =jef-china3
+;;     =daikanwa/+2p
+;;     =+>ucs@iso =+>ucs@unicode
+;;     =+>ucs@jis
+;;     =+>ucs@cns
+;;     =+>ucs@ks
+;;     =+>ucs@jis/1990
+;;     =>mj
+;;     =>jis-x0208 =>jis-x0213-1
+;;     =>jis-x0208@1997
+;;     =>ucs@iwds-1
+;;     =>ucs@cognate
+;;     =>ucs@component
+;;     =>iwds-1
+;;     =>ucs@iso
+;;     =>ucs@unicode
+;;     =>ucs@jis =>ucs@cns =>ucs@ks
+;;     =>gt
+;;     =>gt-k
+;;     =>>ucs@iso =>>ucs@unicode
+;;     =>>ucs@jis =>>ucs@cns =>>ucs@ks
+;;     =>>gt-k
+;;     =>>hanyo-denshi/ks
+;;     ==mj
+;;     ==ucs@iso
+;;     ==ucs@unicode
+;;     ==adobe-japan1-0
+;;     ==adobe-japan1-1
+;;     ==adobe-japan1-2
+;;     ==adobe-japan1-3
+;;     ==adobe-japan1-4
+;;     ==adobe-japan1-5
+;;     ==adobe-japan1-6
+;;     ==ks-x1001
+;;     ==hanyo-denshi/ks
+;;     ==hanyo-denshi/tk
+;;     ==ucs@jis
+;;     ==gt
+;;     ==cns11643-1 ==cns11643-2 ==cns11643-3
+;;     ==cns11643-4 ==cns11643-5 ==cns11643-6 ==cns11643-7
+;;     ==jis-x0212
+;;     ==ucs@cns
+;;     ==koseki
+;;     ==daikanwa
+;;     ==gt-k
+;;     ==ucs@gb
+;;     ==ucs-itaiji-003
+;;     ==ucs@JP/hanazono
+;;     ==daikanwa/+2p
+;;     =>>jis-x0208 =>>jis-x0213-1 =>>jis-x0213-2
+;;     =+>jis-x0208 =+>jis-x0213-1 =+>jis-x0213-2
+;;     =+>hanyo-denshi/jt
+;;     =+>jis-x0208@1978
+;;     =>>gt
+;;     =+>adobe-japan1
+;;     =>>adobe-japan1
+;;     =jis-x0208@1983 =jis-x0208@1978
+;;     =>ucs-itaiji-001
+;;     =>ucs-itaiji-002
+;;     =>ucs-itaiji-003
+;;     =>ucs-itaiji-004
+;;     =>ucs-itaiji-005
+;;     =>ucs-itaiji-006
+;;     =>ucs-itaiji-007
+;;     =>ucs-itaiji-009
+;;     ==>ucs@bucs
+;;     =big5
+;;     =>cbeta
+;;     ===mj
+;;     ===ucs@iso
+;;     ===ucs@unicode
+;;     ===hanyo-denshi/ks
+;;     ===ks-x1001
+;;     ===gt
+;;     ===gt-k
+;;     ===ucs@ks
+;;     ===ucs@gb
+;;     =shinjigen
+;;     =shinjigen@rev
+;;     =shinjigen@1ed
+;;     =shinjigen/+p@rev
+;;     ==shinjigen
+;;     ==shinjigen@rev
+;;     ==daikanwa/+p
+;;     ==shinjigen@1ed
+;;     ===daikanwa/+p
+;;     =>daikanwa/ho
+;;     ===daikanwa/ho
+;;     ))
 
 ;; (defvar isd-turtle-ccs-list nil)
 (defvar chise-turtle-ccs-prefix-alist nil)
            (format (charset-code-point-format-spec ccs)
                    code-point))))
 
-(defun isd-turtle-encode-char (object)
-  (let ((ccs-list est-coded-charset-priority-list)
-       ccs ret)
-    (if (setq ret (encode-char object '=ucs))
-       (chise-turtle-format-ccs-code-point '=ucs ret)
-      (while (and ccs-list
-                 (setq ccs (pop ccs-list))
-                 (not (setq ret (encode-char object ccs 'defined-only)))))
-      (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)
-            )
-           (t
-            (format (if est-hide-cgi-mode
-                        "system-char-id=0x%X"
-                      "system-char-id:0x%X")
-                    (encode-char object 'system-char-id))
-            )))))
+;; (defun isd-turtle-encode-char (object)
+;;   (let ((ccs-list est-coded-charset-priority-list)
+;;         ccs ret)
+;;     (if (setq ret (encode-char object '=ucs))
+;;         (chise-turtle-format-ccs-code-point '=ucs ret)
+;;       (while (and ccs-list
+;;                   (setq ccs (pop ccs-list))
+;;                   (not (setq ret (encode-char object ccs 'defined-only)))))
+;;       (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)
+;;              )
+;;             (t
+;;              (format (if est-hide-cgi-mode
+;;                          "system-char-id=0x%X"
+;;                        "system-char-id:0x%X")
+;;                      (encode-char object 'system-char-id))
+;;              )))))
 
 (defun isd-turtle-format-component (component separator level prefix)
   (cond ((characterp component)
         (format "%s %c # %c"
-                (isd-turtle-encode-char component)
+                (chise-turtle-encode-char component)
                 separator
                 component)
         )
         (let ((ret (find-char component)))
           (cond (ret
                  (format "%s %c # %c"
-                         (isd-turtle-encode-char ret) separator ret))
+                         (chise-turtle-encode-char ret) separator ret))
                 ((setq ret (assq 'ideographic-structure component))
                  (if (eq separator ?\;)
                      (format "%s ;"