sieve-mode: support "body" test command
[gnus] / lisp / nnir.el
index d678517..15ccc47 100644 (file)
@@ -1,6 +1,6 @@
 ;;; nnir.el --- search mail with various search engines -*- coding: utf-8 -*-
 
-;; Copyright (C) 1998-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2015 Free Software Foundation, Inc.
 
 ;; Author: Kai Großjohann <grossjohann@ls6.cs.uni-dortmund.de>
 ;; Swish-e and Swish++ backends by:
@@ -281,16 +281,6 @@ is `(valuefunc member)'."
 
 (require 'gnus-sum)
 
-(eval-when-compile
-  (autoload 'nnimap-buffer "nnimap")
-  (autoload 'nnimap-command "nnimap")
-  (autoload 'nnimap-change-group "nnimap")
-  (autoload 'nnimap-make-thread-query "nnimap")
-  (autoload 'gnus-registry-action "gnus-registry")
-  (autoload 'gnus-registry-get-id-key "gnus-registry")
-  (autoload 'gnus-group-topic-name "gnus-topic"))
-
-
 (nnoo-declare nnir)
 (nnoo-define-basics nnir)
 
@@ -586,6 +576,8 @@ Add an entry here when adding a new search engine.")
 
 ;; Gnus glue.
 
+(declare-function gnus-group-topic-name "gnus-topic" ())
+
 (defun gnus-group-make-nnir-group (nnir-extra-parms &optional specs)
   "Create an nnir group.  Prompt for a search query and determine
 the groups to search as follows: if called from the *Server*
@@ -948,6 +940,10 @@ ready to be added to the list of search results."
 
 ;;; Search Engine Interfaces:
 
+(autoload 'nnimap-change-group "nnimap")
+(declare-function nnimap-buffer "nnimap" ())
+(declare-function nnimap-command "nnimap" (&rest args))
+
 ;; imap interface
 (defun nnir-run-imap (query srv &optional groups)
   "Run a search against an IMAP back-end server.
@@ -1483,7 +1479,7 @@ Tested with Namazu 2.0.6 on a GNU/Linux system."
 
       (goto-char (point-min))
       (while (re-search-forward
-              "^\\([0-9]+\\.\\).*\\((score: \\([0-9]+\\)\\))\n\\([^ ]+\\)"
+              "^\\([0-9,]+\\.\\).*\\((score: \\([0-9]+\\)\\))\n\\([^ ]+\\)"
               nil t)
         (setq score (match-string 3)
               group (file-name-directory (match-string 4))
@@ -1774,6 +1770,9 @@ environment unless `not-global' is non-nil."
   (let ((backend (car (gnus-server-to-method server))))
     (nnoo-current-server-p (or backend 'nnir) server)))
 
+(autoload 'nnimap-make-thread-query "nnimap")
+(declare-function gnus-registry-get-id-key "gnus-registry" (id key))
+
 (defun nnir-search-thread (header)
   "Make an nnir group based on the thread containing the article
 header. The current server will be searched. If the registry is
@@ -1841,6 +1840,10 @@ article came from is also searched."
            (forward-line)))))
     groups))
 
+;; Behind gnus-registry-enabled test.
+(declare-function gnus-registry-action "gnus-registry"
+                  (action data-header from &optional to method))
+
 (defun nnir-registry-action (action data-header from &optional to method)
   "Call `gnus-registry-action' with the original article group."
   (gnus-registry-action