(gnus-request-thread): Rework to take a header instead of a Message-ID to avoid havin...
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Mon, 6 Dec 2010 17:07:55 +0000 (18:07 +0100)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Mon, 6 Dec 2010 17:07:55 +0000 (18:07 +0100)
lisp/ChangeLog
lisp/gnus-int.el
lisp/gnus-sum.el
lisp/nnimap.el

index 6d3e937..be63425 100644 (file)
@@ -1,5 +1,8 @@
 2010-12-06  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-int.el (gnus-request-thread): Rework to take a header instead of
+       a Message-ID to avoid having nnimap depend on gnus-sum.
+
        * shr.el (shr-descend): Only colorise something if we have a node that
        sets colors.
 
index 767ac2e..4328454 100644 (file)
@@ -503,12 +503,11 @@ If BUFFER, insert the article in that group."
             article (gnus-group-real-name group)
             (nth 1 gnus-command-method) buffer)))
 
-(defun gnus-request-thread (id)
-  "Request the headers in the thread containing the article
-specified by Message-ID id."
+(defun gnus-request-thread (header)
+  "Request the headers in the thread containing the article specified by HEADER."
   (let ((gnus-command-method (gnus-find-method-for-group gnus-newsgroup-name)))
     (funcall (gnus-get-function gnus-command-method 'request-thread)
-            id)))
+            header)))
 
 (defun gnus-warp-to-article ()
   "Warps from an article in a virtual group to the article in its
index 2bb39af..1bb4b4a 100644 (file)
@@ -8880,7 +8880,7 @@ variable."
           'list gnus-newsgroup-headers
           (if (gnus-check-backend-function
                'request-thread gnus-newsgroup-name)
-              (gnus-request-thread id)
+              (gnus-request-thread (gnus-summary-article-header))
             (let* ((last (if (numberp limit)
                              (min (+ (mail-header-number
                                       (gnus-summary-article-header))
index 4b4793d..c7d6139 100644 (file)
@@ -47,9 +47,6 @@
 (require 'nnmail)
 (require 'proto-stream)
 
-(eval-when-compile
-  (require 'gnus-sum))
-
 (autoload 'auth-source-forget-user-or-password "auth-source")
 (autoload 'auth-source-user-or-password "auth-source")
 
@@ -1426,9 +1423,10 @@ textual parts.")
   (setq nnimap-status-string "Read-only server")
   nil)
 
-(deffoo nnimap-request-thread (id)
-  (let* ((refs (split-string
-               (or (mail-header-references (gnus-summary-article-header))
+(deffoo nnimap-request-thread (header)
+  (let* ((id (mail-header-id header))
+        (refs (split-string
+               (or (mail-header-references header)
                    "")))
         (cmd (let ((value
                     (format