2001-10-23 Per Abrahamsen <abraham@dina.kvl.dk>
authorPer Abrahamsen <abraham@dina.kvl.dk>
Tue, 23 Oct 2001 14:10:51 +0000 (14:10 +0000)
committerPer Abrahamsen <abraham@dina.kvl.dk>
Tue, 23 Oct 2001 14:10:51 +0000 (14:10 +0000)
* 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.

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

index cc2db68..88e241f 100644 (file)
@@ -1,6 +1,17 @@
+2001-10-23  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * 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  <abraham@dina.kvl.dk>
 
        * gnus.el (post-method): Use `native' instead of `nil'.
+
        * gnus-msg.el (gnus-post-method): Ditto.
 
 2001-10-23  Per Abrahamsen  <abraham@dina.kvl.dk>
index 99142b6..b6f86ea 100644 (file)
@@ -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)))
index e6a5c22..b9add38 100644 (file)
@@ -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 ()