From 16333fc689b30c3eefd67281366fef7acec0820c Mon Sep 17 00:00:00 2001 From: yoichi Date: Sun, 24 Mar 2002 16:19:07 +0000 Subject: [PATCH] * wl-draft.el (wl-draft-create-contents): Don't take neither (function . args) nor (string . something) any more. * wl-version.el (wl-generate-user-agent-string): Return string without header symbol. * wl-draft.el (wl-draft-default-headers): Use it. --- wl/ChangeLog | 7 +++++++ wl/wl-draft.el | 18 +++--------------- wl/wl-version.el | 9 ++++----- 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 76d26ec..ae8a8dc 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,12 @@ 2002-03-24 Yoichi NAKAYAMA + * wl-draft.el (wl-draft-create-contents): Don't take neither + (function . args) nor (string . something) any more. + + * wl-version.el (wl-generate-user-agent-string): Return string + without header symbol. + * wl-draft.el (wl-draft-default-headers): Use it. + * wl-draft.el (wl-draft-trim-ccs): Renamed from `wl-draft-insert-ccs' and return field value instead of inserting the header. Abolish cc argument. diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 6f81fd8..0748f8c 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -1556,9 +1556,8 @@ Derived from `message-save-drafts' in T-gnus." (symbol . string) ;; insert symbol-value: string (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 + (symbol . nil) ;; do nothing + nil ;; do nothing ) " (unless (eq major-mode 'wl-draft-mode) @@ -1576,7 +1575,6 @@ Derived from `message-save-drafts' in T-gnus." (setq field (car (car halist))) (setq value (cdr (car halist))) (cond - ((functionp field) (apply field value)) ((symbolp field) (cond ((stringp value) (insert (symbol-name field) ": " value "\n")) @@ -1587,16 +1585,6 @@ Derived from `message-save-drafts' in T-gnus." ((not value)) (t (debug)))) - ((stringp field) - (cond - ((stringp value) (insert field value "\n")) - ((functionp value) - (let ((value-return (funcall value))) - (when (stringp value-return) - (insert field value-return "\n")))) - ((not value)) - (t - (debug)))) ;; ((not field)) (t @@ -1676,7 +1664,7 @@ Derived from `message-save-drafts' in T-gnus." (cons 'Mail-Reply-To (and wl-insert-mail-reply-to (wl-address-header-extract-address wl-from))) - (cons "" wl-generate-mailer-string-function) + (cons 'User-Agent wl-generate-mailer-string-function) (cons 'Reply-To mail-default-reply-to) (cons 'Bcc (function (lambda () diff --git a/wl/wl-version.el b/wl/wl-version.el index ecb8b2e..5b7fdaf 100644 --- a/wl/wl-version.el +++ b/wl/wl-version.el @@ -87,11 +87,10 @@ If variable `wl-version-status' is non-nil, override default rule." (defun wl-generate-user-agent-string () "A candidate of `wl-generate-mailer-string-function'. Insert User-Agent field instead of X-Mailer field." - (concat "User-Agent: " - (wl-generate-user-agent-string-1 - ;; for backward compatibility - (and (boundp 'mime-edit-insert-user-agent-field) - mime-edit-insert-user-agent-field)))) + (wl-generate-user-agent-string-1 + ;; for backward compatibility + (and (boundp 'mime-edit-insert-user-agent-field) + mime-edit-insert-user-agent-field))) (defun wl-generate-user-agent-string-1 (&optional verbose) "Return User-Agent field value. -- 1.7.10.4