(est-eval-value-as-journal-volume): Refer `<-journal/volume*name'.
authorMORIOKA Tomohiko <tomo.git@chise.org>
Sat, 15 Sep 2012 04:01:34 +0000 (13:01 +0900)
committerMORIOKA Tomohiko <tomo.git@chise.org>
Sat, 15 Sep 2012 04:01:34 +0000 (13:01 +0900)
(est-eval-value-as-creators-names): Fix problem when string is
occurred in value.

est-eval.el

index d3844c0..ab734df 100644 (file)
 (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)))
                   '(: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)))