+2002-03-24 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * wl-draft.el (wl-draft-create-contents): For the case of
+ (symbol-or-string . function) insert header only when the function
+ returns string value.
+
2002-03-21 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
* wl-vars.el (wl-draft-fields): "FCC" -> "Fcc".
'(function ;; funcall
string ;; insert string
(symbol . string) ;; insert symbol-value: string
- (symbol . function) ;; insert symbol-value: (funcall)
+ (symbol . function) ;; (funcall) and if it returns string,
+ ;; insert symbol-value: string
(symbol . nil) ;; insert nothing
(function . (arg1 arg2 ..)) ;; call function with argument
nil ;; insert nothing
(cond
((stringp value) (insert (symbol-name field) ": " value "\n"))
((functionp value)
- (insert (symbol-name field) ": " (funcall value) "\n"))
+ (let ((value-return (funcall value)))
+ (when (stringp value-return)
+ (insert (symbol-name field) ": " value-return "\n"))))
((not value))
(t
(debug))))
((stringp field)
(cond
((stringp value) (insert field value "\n"))
- ((functionp value) (insert field (funcall value) "\n"))
+ ((functionp value)
+ (let ((value-return (funcall value)))
+ (when (stringp value-return)
+ (insert field value-return "\n"))))
((not value))
(t
(debug))))