(article-transform-date): Fix infinite recursion.
[gnus] / lisp / nnir.el
index 0f07bb1..8e91c68 100644 (file)
@@ -1,7 +1,6 @@
 ;;; nnir.el --- search mail with various search engines -*- coding: iso-8859-1 -*-
 
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-;;   2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2011 Free Software Foundation, Inc.
 
 ;; Author: Kai Großjohann <grossjohann@ls6.cs.uni-dortmund.de>
 ;; Swish-e and Swish++ backends by:
@@ -305,13 +304,6 @@ is `(valuefunc member)'."
   "Search groups in Gnus with assorted seach engines."
   :group 'gnus)
 
-(defcustom nnir-method-default-engines
-  '((nnimap . imap)
-    (nntp . gmane))
-  "*Alist of default search engines keyed by server method."
-  :type '(alist)
-  :group 'nnir)
-
 (defcustom nnir-ignored-newsgroups ""
   "*A regexp to match newsgroups in the active file that should
   be skipped when searching."
@@ -329,7 +321,7 @@ with three items unique to nnir summary buffers:
 %g    Article original short group name (string)
 
 If nil this will use `gnus-summary-line-format'."
-  :type '(regexp)
+  :type '(string)
   :group 'nnir)
 
 (defcustom nnir-retrieve-headers-override-function nil
@@ -347,7 +339,8 @@ result, `gnus-retrieve-headers' will be called instead."
   "*The default IMAP search key for an nnir search. Must be one of
   the keys in `nnir-imap-search-arguments'. To use raw imap queries
   by default set this to \"Imap\"."
-  :type '(string)
+  :type `(choice ,@(mapcar (lambda (elem) (list 'const (car elem)))
+                          nnir-imap-search-arguments))
   :group 'nnir)
 
 (defcustom nnir-swish++-configuration-file
@@ -546,6 +539,18 @@ needs the variables `nnir-namazu-program',
 
 Add an entry here when adding a new search engine.")
 
+(defcustom nnir-method-default-engines
+  '((nnimap . imap)
+    (nntp . gmane))
+  "*Alist of default search engines keyed by server method."
+  :type `(repeat (cons (choice (const nnimap) (const nttp) (const nnspool)
+                              (const nneething) (const nndir) (const nnmbox)
+                              (const nnml) (const nnmh) (const nndraft)
+                              (const nnfolder) (const nnmaildir))
+                      (choice
+                       ,@(mapcar (lambda (elem) (list 'const (car elem)))
+                                 nnir-engines))))
+  :group 'nnir)
 
 ;; Gnus glue.
 
@@ -1537,7 +1542,8 @@ server is of form 'backend:name'."
       (let ((cur (current-buffer))
            name)
        (goto-char (point-min))
-       (unless (string= nnir-ignored-newsgroups "")
+       (unless (or (null nnir-ignored-newsgroups)
+                   (string= nnir-ignored-newsgroups ""))
          (delete-matching-lines nnir-ignored-newsgroups))
        (if (eq (car method) 'nntp)
            (while (not (eobp))
@@ -1583,7 +1589,8 @@ server is of form 'backend:name'."
   (when (eq (car (gnus-find-method-for-group gnus-newsgroup-name)) 'nnir)
     (setq gnus-summary-line-format
          (or nnir-summary-line-format gnus-summary-line-format))
-    (when (eq gnus-registry-install t)
+    (when (and (boundp 'gnus-registry-install)
+                      (eq gnus-registry-install t))
       (remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t)
       (remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t)
       (remove-hook 'gnus-summary-article-expire-hook 'gnus-registry-action t)