From 458cd2ffeb5a3a2ba326f47d85d61fc2471821e3 Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Tue, 15 Dec 2020 02:05:29 +0900 Subject: [PATCH] (est-eval-value-as-Web-yunzi-char): New function. (est-eval-value-as-Web-yunzi-char-list): New function. (est-eval-apply-value): Use `est-eval-value-as-Web-yunzi-char-list' for format `space-separated-Web-yunzi-char-list'. --- est-eval.el | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/est-eval.el b/est-eval.el index 65db614..7d5b55a 100644 --- a/est-eval.el +++ b/est-eval.el @@ -456,6 +456,14 @@ (daijiten-page-number-to-ndl-950498 value))) value))) +(defun est-eval-value-as-Web-yunzi-char (value) + (if (char-or-char-int-p value) + (list 'link + (list :ref + (format "http://suzukish.s252.xrea.com/search/inkyo/yunzi/%c" + value)) + (format "/%s/" (char-to-string value))))) + (defun est-eval-value-as-object-list (value &optional separator subtype) (if (and (listp value) (listp (cdr value))) @@ -700,6 +708,20 @@ (error (format "%s" value))) (format "%s" value))) +(defun est-eval-value-as-Web-yunzi-char-list (value &optional separator subtype) + (if (and (listp value) + (listp (cdr value))) + (condition-case nil + (let (props) + (if separator + (setq props (list :separator separator))) + (if subtype + (setq props (list* :subtype subtype props))) + (list* 'list props + (mapcar #'est-eval-value-as-Web-yunzi-char value))) + (error (format "%s" value))) + (format "%s" value))) + (defun est-eval-value-as-creators-names (value &optional subtype) (if (listp value) (let (role-name) @@ -868,6 +890,8 @@ (est-eval-value-as-journal-volumes value)) ((eq format 'space-separated-daijiten-page-list) (est-eval-value-as-daijiten-page-list value " ")) + ((eq format 'space-separated-Web-yunzi-char-list) + (est-eval-value-as-Web-yunzi-char-list value " ")) (t (est-eval-value-default value) )) -- 1.7.10.4