From: okada Date: Sat, 18 May 2002 14:03:36 +0000 (+0000) Subject: * wl-vars.el (wl-nntp-posting-config-alist): New variable. X-Git-Tag: elmo-mark-root~114 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d4d69afc0436a28cbf8be99a00f5c651d34b96c3;p=elisp%2Fwanderlust.git * wl-vars.el (wl-nntp-posting-config-alist): New variable. (wl-nntp-posting-function): New variable. * wl-draft.el (wl-draft-elmo-nntp-send): Change for `wl-nntp-posting-config-alist'. --- diff --git a/doc/wl-ja.texi b/doc/wl-ja.texi index 38c277a..ce357c4 100644 --- a/doc/wl-ja.texi +++ b/doc/wl-ja.texi @@ -4707,6 +4707,17 @@ SMTP のコネクションをどのように張るかを指定します。 Non-nil ならニュース投稿時に SSL を利用します。 @code{starttls}なら STARTTLS (RFC2595)を利用してコネクションを張ります。 +@item wl-nntp-posting-function +@vindex wl-nntp-posting-function +初期設定は @code{elmo-nntp-post}。 +ニュース投稿のための関数。 + +@item wl-nntp-posting-config-alist +@vindex wl-nntp-posting-config-alist +初期設定は @code{nil}。 +ニュース投稿時のサーバ選択方法を設定します。 +@code{wl-nntp-posting-{server|user|port|function}}より優先されます。 + @item wl-pop-before-smtp-user @vindex wl-pop-before-smtp-user 初期設定は @code{nil}。 diff --git a/doc/wl.texi b/doc/wl.texi index 504a9f1..6761fdf 100644 --- a/doc/wl.texi +++ b/doc/wl.texi @@ -4768,6 +4768,16 @@ If @code{nil}, @code{elmo-nntp-default-stream-type} is evaluated. If non-nil, SSL is used for news submission. If @code{starttls}, STARTTLS (RFC2595) connection will be established. +@item wl-nntp-posting-function +@vindex wl-nntp-posting-function +The initial setting is @code{elmo-nntp-post}. +This is the function to post NNTP message. + +@item wl-nntp-posting-config-alist +@vindex wl-nntp-posting-config-alist +The initial setting is @code{nil}. +An alist to define NNTP server. + @item wl-pop-before-smtp-user @vindex wl-pop-before-smtp-user The initial setting is @code{nil}. diff --git a/wl/ChangeLog b/wl/ChangeLog index be5cc7a..bf76075 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,10 @@ +2002-05-18 Kenichi OKADA + + * wl-vars.el (wl-nntp-posting-config-alist): New variable. + (wl-nntp-posting-function): New variable. + * wl-draft.el (wl-draft-elmo-nntp-send): Change for + `wl-nntp-posting-config-alist'. + 2002-05-17 Yoichi NAKAYAMA * wl-draft.el (wl-draft-send-mail-with-smtp): Remove staff for older diff --git a/wl/wl-draft.el b/wl/wl-draft.el index a87e6af..446886f 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -1247,7 +1247,7 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (expand-abbrev) ; for mail-abbrevs (let ((mime-header-encode-method-alist (append - '((wl-draft-eword-encode-address-list + '((wl-draft-eword-encode-address-list . (To Cc Bcc Resent-To Resent-Cc Bcc Resent-Bcc))) (if (boundp 'mime-header-encode-method-alist) (symbol-value 'mime-header-encode-method-alist))))) @@ -1729,12 +1729,27 @@ Derived from `message-save-drafts' in T-gnus." (elmo-nntp-default-port (or wl-nntp-posting-port elmo-nntp-default-port)) (elmo-nntp-default-stream-type - (or wl-nntp-posting-stream-type elmo-nntp-default-stream-type))) + (or wl-nntp-posting-stream-type elmo-nntp-default-stream-type)) + (elmo-nntp-default-function wl-nntp-posting-function) + condition) + (if (setq condition (cdr (elmo-string-matched-assoc + (std11-field-body "Newsgroups") + wl-nntp-posting-config-alist))) + (if (stringp condition) + (setq elmo-nntp-default-server condition) + (while (car condition) + (set (intern (format "elmo-nntp-default-%s" + (symbol-name (caar condition)))) + (cdar condition)) + (setq condition (cdr condition))))) + (unless elmo-nntp-default-function + (error "wl-draft-nntp-send: posting-function is nil.")) (if (not (elmo-plugged-p elmo-nntp-default-server elmo-nntp-default-port)) (wl-draft-set-sent-message 'news 'unplugged (cons elmo-nntp-default-server elmo-nntp-default-port)) - (elmo-nntp-post elmo-nntp-default-server (current-buffer)) + (funcall elmo-nntp-default-function + elmo-nntp-default-server (current-buffer)) (wl-draft-set-sent-message 'news 'sent) (wl-draft-write-sendlog 'ok 'nntp elmo-nntp-default-server (std11-field-body "Newsgroups") diff --git a/wl/wl-vars.el b/wl/wl-vars.el index 823c595..5e113e3 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -523,6 +523,33 @@ If nil, `elmo-nntp-default-port' is used." If nil, `elmo-nntp-default-stream-type' is used." :type 'boolean :group 'wl) +(defcustom wl-nntp-posting-function 'elmo-nntp-post + "A function to post news. +Prepared candidate is 'elmo-nntp-post." + :type '(radio (function-item elmo-nntp-post) + (function :tag "Other")) + :group 'wl-draft) +(defcustom wl-nntp-posting-config-alist nil + "*Alist of configuration on nntp posting. +ex. +'((\",?local.test\" . \"news.media.kyoto-u.ac.jp\") + (\",?ku\\.\" . + ((server . \"news.media.kyoto-u.ac.jp\") + (user . \"newsmaster\") + (port . 119) + (function . elmo-nntp-post)) + (\".*\" . \"newsfeed.kuee.kyoto-u.ac.jp\")))" + :type '(repeat (cons (sexp :tag "Match") + (choice (string :tag "Server") + (repeat :inlie t + (cons (choice (const server) + (const user) + (const port) + (const stream-type) + (const function)) + (sexp :tag "Value")))))) + :group 'wl-draft + :group 'wl-setting) (defcustom wl-prefetch-confirm t "*Confirm prefetching if message size is larger than `wl-prefetch-threshold'."