summaryrefslogtreecommitdiff
path: root/lisp/gnus/nnimap.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus/nnimap.el')
-rw-r--r--lisp/gnus/nnimap.el20
1 files changed, 11 insertions, 9 deletions
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 385522759b6..8a0d635ef7b 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -1566,15 +1566,17 @@ textual parts.")
(articles &optional limit force-new dependencies))
(deffoo nnimap-request-thread (header &optional group server)
- (when (nnimap-possibly-change-group group server)
- (let* ((cmd (nnimap-make-thread-query header))
- (result (with-current-buffer (nnimap-buffer)
- (nnimap-command "UID SEARCH %s" cmd))))
- (when result
- (gnus-fetch-headers
- (and (car result) (delete 0 (mapcar #'string-to-number
- (cdr (assoc "SEARCH" (cdr result))))))
- nil t)))))
+ (if gnus-refer-thread-use-nnir
+ (nnir-search-thread header)
+ (when (nnimap-possibly-change-group group server)
+ (let* ((cmd (nnimap-make-thread-query header))
+ (result (with-current-buffer (nnimap-buffer)
+ (nnimap-command "UID SEARCH %s" cmd))))
+ (when result
+ (gnus-fetch-headers
+ (and (car result) (delete 0 (mapcar #'string-to-number
+ (cdr (assoc "SEARCH" (cdr result))))))
+ nil t))))))
(defun nnimap-possibly-change-group (group server)
(let ((open-result t))