From 98f38e5383840a86e4ebca5803d505110d0997f8 Mon Sep 17 00:00:00 2001 From: yoichi Date: Thu, 12 Sep 2002 14:59:29 +0000 Subject: [PATCH] * 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/ChangeLog | 7 +++++++ wl/wl-draft.el | 21 ++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 9ec8c26..3d75292 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,12 @@ 2002-09-12 Yoichi NAKAYAMA + * 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. diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 41fb95e..f1fe90a 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -1906,34 +1906,41 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (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) -- 1.7.10.4