From 0b854eddd79e756016737921ad84521e0efb21c4 Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Sat, 15 Sep 2012 13:01:34 +0900 Subject: [PATCH] (est-eval-value-as-journal-volume): Refer `<-journal/volume*name'. (est-eval-value-as-creators-names): Fix problem when string is occurred in value. --- est-eval.el | 76 +++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 33 deletions(-) diff --git a/est-eval.el b/est-eval.el index d3844c0..ab734df 100644 --- a/est-eval.el +++ b/est-eval.el @@ -106,30 +106,37 @@ (defun est-eval-value-as-journal-volume (value) (let ((journal (car (or (concord-object-get value '<-journal/volume) (concord-object-get value '<-volume)))) + (vol-name (concord-object-get value '<-journal/volume*name)) volume-type number-type year dest ret title subtitle) (cond (journal - (setq volume-type (concord-object-get journal 'volume/type/code) - number-type (concord-object-get journal 'number/type/code)) - (setq year (or (concord-object-get value '->published/date*year) - (concord-object-get - (car (concord-object-get value 'date)) 'year))) - (setq dest - (list - (list 'object - (list :object value) - (ruimoku-format-volume - volume-type - (or (concord-object-get value '<-journal/volume*volume) - (concord-object-get value '<-volume*volume)) - year 'cjk) - (ruimoku-format-volume - number-type - (or (concord-object-get value '<-journal/volume*number) - (concord-object-get value '<-volume*number)) - year 'cjk)))) + (if vol-name + (setq dest + (list + (list 'object (list :object value) + vol-name))) + (setq volume-type (concord-object-get journal 'volume/type/code) + number-type (concord-object-get journal 'number/type/code)) + (setq year (or (concord-object-get value '->published/date*year) + (concord-object-get + (car (concord-object-get value 'date)) 'year))) + (setq dest + (list + (list 'object + (list :object value) + (ruimoku-format-volume + volume-type + (or (concord-object-get value '<-journal/volume*volume) + (concord-object-get value '<-volume*volume)) + year 'cjk) + (ruimoku-format-volume + number-type + (or (concord-object-get value '<-journal/volume*number) + (concord-object-get value '<-volume*number)) + year 'cjk)))) + ) (if (setq ret (est-eval-value-as-object journal)) (setq dest (list* ret " " dest))) @@ -489,20 +496,23 @@ '(:subtype unordered-list) '(:separator " ")) (mapcar (lambda (creator) - (setq role-name - (concord-object-get creator - 'role*name)) - (est-eval-list - (list - '(value (:feature ->creator/name)) - (list - 'object (list :object creator) - (or role-name - (format "(%s)" - (concord-object-get creator - 'role*type))))) - creator nil) - ) + (cond + ((concord-object-p creator) + (setq role-name + (concord-object-get + creator 'role*name)) + (est-eval-list + (list + '(value (:feature ->creator/name)) + (list + 'object (list :object creator) + (or role-name + (format "(%s)" + (concord-object-get creator + 'role*type))))) + creator nil) + ) + (t creator))) value) )) (est-eval-value-default value))) -- 1.7.10.4