2001-08-02 Katsumi Yamaoka <yamaoka@jpl.org>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 3 Aug 2001 04:53:52 +0000 (04:53 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 3 Aug 2001 04:53:52 +0000 (04:53 +0000)
* gnus.el (post-method): New group parameter.  It also provides
the user option `gnus-post-method-alist' and the internal function
`gnus-parameter-post-method'.

* gnus-msg.el (gnus-post-method): Bind the value of
`gnus-post-method' to the group parameter if it is defined.

lisp/ChangeLog
lisp/gnus-msg.el
lisp/gnus.el

index 98cdc21..bee30d7 100644 (file)
@@ -1,3 +1,12 @@
+2001-08-02  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus.el (post-method): New group parameter.  It also provides
+       the user option `gnus-post-method-alist' and the internal function
+       `gnus-parameter-post-method'.
+
+       * gnus-msg.el (gnus-post-method): Bind the value of
+       `gnus-post-method' to the group parameter if it is defined.
+       
 2001-08-02  Simon Josefsson  <jas@extundo.com>
 
        * smime.el (smime-extra-arguments): Removed.
index fdee9c7..1572a28 100644 (file)
@@ -649,9 +649,9 @@ header line with the old Message-ID."
 (defun gnus-post-method (arg group &optional silent)
   "Return the posting method based on GROUP and ARG.
 If SILENT, don't prompt the user."
-  (let ((group-method
-        (or (car (gnus-group-find-parameter group 'gnus-post-method t))
-            (gnus-find-method-for-group group))))
+  (let ((gnus-post-method (or (gnus-parameter-post-method group)
+                             gnus-post-method))
+       (group-method (gnus-find-method-for-group group)))
     (cond
      ;; If the group-method is nil (which shouldn't happen) we use
      ;; the default method.
index c9d70ac..4c4f3b7 100644 (file)
@@ -1582,6 +1582,28 @@ Use with caution.")
  :parameter-document "\
 The default charset to use in the group.")
 
+(gnus-define-group-parameter
+ post-method
+ :type list
+ :function-document
+ "Return a posting method for GROUP."
+ :variable gnus-post-method-alist
+ :variable-document
+ "Alist of regexps (to match group names) and method to be used when
+posting an article."
+ :variable-group gnus-group-foreign
+ :parameter-type
+ '(choice :tag "Posting Method"
+         (const nil)
+         (const current)
+         (const native)
+         (list :convert-widget
+               (lambda (widget)
+                 (list 'sexp :tag "Methods"
+                       :value gnus-select-method))))
+ :parameter-document
+ "Posting method for this group.")
+
 (defcustom gnus-group-uncollapsed-levels 1
   "Number of group name elements to leave alone when making a short group name."
   :group 'gnus-group-visual