From daad5ccf48b9414b51e95a8a742bf6ece51dc32f Mon Sep 17 00:00:00 2001 From: yoichi Date: Fri, 20 Dec 2002 09:51:30 +0000 Subject: [PATCH] * wl-news.el.in (wl-news-send-to-address): New variable. (wl-news-send-news): Use it. (wl-news-check): Call wl-news-send-news if wl-news-send-to-address. --- wl/ChangeLog | 6 ++++++ wl/wl-news.el.in | 15 +++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 4cf51dc..a34b9d0 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,9 @@ +2002-12-20 Yoichi NAKAYAMA + + * wl-news.el.in (wl-news-send-to-address): New variable. + (wl-news-send-news): Use it. + (wl-news-check): Call wl-news-send-news if wl-news-send-to-address. + 2002-12-20 Kenichi OKADA * wl-news.el.in (wl-news-send-news): Delete diff --git a/wl/wl-news.el.in b/wl/wl-news.el.in index 0a2e8d0..1e6d7ae 100644 --- a/wl/wl-news.el.in +++ b/wl/wl-news.el.in @@ -35,19 +35,21 @@ (require 'wl-vars) (require 'wl-util) (require 'wl-address) -(require 'wl-draft) (require 'wl-folder) -(require 'wl-mime) (defvar wl-news-version-file-name "previous-version") (defvar wl-news-default-previous-version '(2 0 0)) +(defvar wl-news-send-to-address nil + "*The recipient address to send NEWS.") + (defun wl-news-check () (let ((previous-version (wl-news-previous-version-load)) (current-version (product-version (product-find 'wl-version)))) (if (and (< 0 (product-version-compare current-version previous-version)) wl-news-lang + wl-news-send-to-address (wl-news-send-news previous-version)) (wl-news-previous-version-save current-version)))) @@ -94,6 +96,7 @@ (kill-buffer tmp-buffer)))) (defun wl-news-append-news (lang previous-version) + (require 'wl-mime) (let* ((news-list (cdr (assoc lang wl-news-news-alist)))) (mime-edit-insert-tag "text" "plain" "" "") (while (< 0 @@ -104,19 +107,23 @@ (setq news-list (cdr news-list))))) (defun wl-news-send-news (previous-version) + (require 'wl-draft) (let ((lang (if (listp wl-news-lang) wl-news-lang - (list wl-news-lang)))) + (list wl-news-lang))) + wl-fcc wl-bcc) (save-window-excursion (wl-draft-create-buffer) (wl-draft-create-contents (list (cons 'From "WL Release 'Bot ") - (cons 'To (wl-draft-eword-encode-address-list wl-from) ) + (cons 'To (wl-draft-eword-encode-address-list + wl-news-send-to-address)) (cons 'Subject "Wanderlust NEWS") (cons 'User-Agent wl-generate-mailer-string-function))) (wl-draft-insert-mail-header-separator) (wl-draft-prepare-edit) (goto-char (point-max)) + (insert "This message is automatically generated by Wanderlust.\n") (while (car lang) (wl-news-append-news (car lang) previous-version) -- 1.7.10.4