2002-09-12 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+ * wl-draft.el (wl-draft-config-sub-eval-insert): New function.
+ Evaluate content and if the value is string, insert it.
+ (wl-draft-config-sub-body,wl-draft-config-sub-top,
+ wl-draft-config-sub-bottom,wl-draft-config-sub-header,
+ wl-draft-config-sub-header-top,wl-draft-config-sub-part-top,
+ wl-draft-config-sub-part-bottom): Use it.
+
* wl-summary.el (wl-summary-cleanup-temp-marks): Ask execution
with the folder name. The question was unintelligible when it is
called from wl-save-status.
(beginning-of-line)
(goto-char (point-max))))))
+(defsubst wl-draft-config-sub-eval-insert (content &optional newline)
+ (let (content-value)
+ (when (and content
+ (stringp (setq content-value (eval content))))
+ (insert content-value)
+ (if newline (insert "\n")))))
+
(defun wl-draft-config-sub-body (content)
(wl-draft-body-goto-top)
(delete-region (point) (point-max))
- (if content (insert (eval content))))
+ (wl-draft-config-sub-eval-insert content))
(defun wl-draft-config-sub-top (content)
(wl-draft-body-goto-top)
- (if content (insert (eval content))))
+ (wl-draft-config-sub-eval-insert content))
(defun wl-draft-config-sub-bottom (content)
(wl-draft-body-goto-bottom)
- (if content (insert (eval content))))
+ (wl-draft-config-sub-eval-insert content))
(defun wl-draft-config-sub-header (content)
(wl-draft-config-body-goto-header)
- (if content (insert (concat (eval content) "\n"))))
+ (wl-draft-config-sub-eval-insert content 'newline))
(defun wl-draft-config-sub-header-top (content)
(goto-char (point-min))
- (if content (insert (concat (eval content) "\n"))))
+ (wl-draft-config-sub-eval-insert content 'newline))
(defun wl-draft-config-sub-part-top (content)
(goto-char (mime-edit-content-beginning))
- (if content (insert (concat (eval content) "\n"))))
+ (wl-draft-config-sub-eval-insert content 'newline))
(defun wl-draft-config-sub-part-bottom (content)
(goto-char (mime-edit-content-end))
- (if content (insert (concat (eval content) "\n"))))
+ (wl-draft-config-sub-eval-insert content 'newline))
(defsubst wl-draft-config-sub-file (content)
(let ((coding-system-for-read wl-cs-autoconv)