From: Per Abrahamsen Date: Tue, 23 Oct 2001 14:10:51 +0000 (+0000) Subject: 2001-10-23 Per Abrahamsen X-Git-Url: http://cgit.sxemacs.org/?a=commitdiff_plain;h=6ff9e36a060b8ef5f9f68b56488bdba0baa80267;p=gnus 2001-10-23 Per Abrahamsen * gnus.el (gnus-news-group-p): Rewrote. Now accepts a header vector (it didn't before because of a bug). * gnus-msg.el (gnus-post-news): Use header vector directly, if available. Before it converted it to an article number. This makes followup to news articles with negative numbers in nnvirtual groups use news instead of mail. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cc2db68cb..88e241fa0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,17 @@ +2001-10-23 Per Abrahamsen + + * gnus.el (gnus-news-group-p): Rewrote. Now accepts a header + vector (it didn't before because of a bug). + * gnus-msg.el (gnus-post-news): Use header vector directly, if + available. Before it converted it to an article number. + + This makes followup to news articles with negative numbers in + nnvirtual groups use news instead of mail. + 2001-10-23 Per Abrahamsen * gnus.el (post-method): Use `native' instead of `nil'. + * gnus-msg.el (gnus-post-method): Ditto. 2001-10-23 Per Abrahamsen diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 99142b6bd..b6f86ea34 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -614,8 +614,7 @@ header line with the old Message-ID." force-news (and (gnus-news-group-p (or pgroup gnus-newsgroup-name) - (if header (mail-header-number header) - gnus-current-article)) + (or header gnus-current-article)) (not mailing-list) (not to-list) (not to-address))) diff --git a/lisp/gnus.el b/lisp/gnus.el index e6a5c22ad..b9add38cc 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -2521,16 +2521,18 @@ that that variable is buffer-local to the summary buffers." (defun gnus-news-group-p (group &optional article) "Return non-nil if GROUP (and ARTICLE) come from a news server." - (or (gnus-member-of-valid 'post group) ; Ordinary news group. - (and (gnus-member-of-valid 'post-mail group) ; Combined group. - (if (or (null article) - (not (< article 0))) - (eq (gnus-request-type group article) 'news) - (if (not (vectorp article)) - nil - ;; It's a real article. - (eq (gnus-request-type group (mail-header-id article)) - 'news)))))) + (cond ((gnus-member-of-valid 'post group) ;Ordinary news group + t) ;is news of course. + ((not (gnus-member-of-valid 'post-mail group)) ;Non-combined. + nil) ;must be mail then. + ((vectorp article) ;Has header info. + (eq (gnus-request-type group (mail-header-id article)) 'news)) + ((null article) ;Hasn't header info + (eq (gnus-request-type group) 'news)) ;(unknown ==> mail) + ((< article 0) ;Virtual message + nil) ;we don't know, guess mail. + (t ;Has positive number + (eq (gnus-request-type group article) 'news)))) ;use it. ;; Returns a list of writable groups. (defun gnus-writable-groups ()