From: hmurata Date: Mon, 17 Jan 2005 12:21:38 +0000 (+0000) Subject: * wl-mime.el (wl-draft-nntp-attribute): New function. X-Git-Tag: wl-2_14-root~84 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa598d63bdf991a12980285e183ce8b4bed20006;p=elisp%2Fwanderlust.git * wl-mime.el (wl-draft-nntp-attribute): New function. (wl-draft-attribute-nntp-posting-server): Use it. (wl-draft-attribute-nntp-posting-port): Ditto. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 92430e5..ff7a876 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,9 @@ 2005-01-17 Hiroya Murata + * wl-mime.el (wl-draft-nntp-attribute): New function. + (wl-draft-attribute-nntp-posting-server): Use it. + (wl-draft-attribute-nntp-posting-port): Ditto. + * wl-mime.el (wl-draft-preview-attributes-list): New function. (wl-draft-show-attributes-buffer): Ditto. (wl-draft-hide-attributes-buffer): Ditto. diff --git a/wl/wl-mime.el b/wl/wl-mime.el index 6e2f2be..e5bf501 100644 --- a/wl/wl-mime.el +++ b/wl/wl-mime.el @@ -254,11 +254,32 @@ It calls following-method selected from variable (defun wl-draft-attribute-newsgroups () (std11-field-body "Newsgroups")) +(defun wl-draft-nntp-attribute (attribute &optional alternatives) + (let ((config (cdr (elmo-string-matched-assoc + (std11-field-body "newsgroups") + wl-nntp-posting-config-alist))) + entry) + (when (stringp config) + (setq config (list (cons 'server config)))) + (if (setq entry (assq attribute config)) + ;; maybe nil + (cdr entry) + (let (value) + (while alternatives + (if (setq value (symbol-value (car alternatives))) + (setq alternatives nil) + (setq alternatives (cdr alternatives)))) + value)))) + (defun wl-draft-attribute-nntp-posting-server () - (or wl-nntp-posting-server elmo-nntp-default-server)) + (wl-draft-nntp-attribute + 'server + '(wl-nntp-posting-server elmo-nntp-default-server))) (defun wl-draft-attribute-nntp-posting-port () - (or wl-nntp-posting-port elmo-nntp-default-port)) + (wl-draft-nntp-attribute + 'point + '(wl-nntp-posting-port elmo-nntp-default-port))) (defun wl-draft-attribute-value (attr) (let ((name (symbol-name attr))