- (let ((name (let ((name (rd-assoc :namelist)))
- ;; prioritize any combination of first middle last over :name
- (if (>= (length name) 2)
- (mapconcat 'identity name " ")
- (car (rd-assoc :name)))))
+ (let ((name (let ((namelist (rd-assoc :namelist))
+ (let-name (car (rd-assoc :name))))
+ ;; priority: 2 or more from :namelist, then non-empty :name, then
+ ;; any single element of :namelist
+ (cond ((>= (length namelist) 2)
+ (mapconcat 'identity namelist " "))
+ ((not (null let-name))
+ let-name)
+ (t
+ (mapconcat 'identity namelist " ")))))