gnus-msg.el: Fix detection of nnir group.
[gnus] / lisp / nnir.el
index cbe64ba..871ac96 100644 (file)
@@ -1707,6 +1707,11 @@ actually)."
 
 ;;; Util Code:
 
+(defun gnus-nnir-group-p (group)
+  "Say whether GROUP is nnir or not."
+  (eq 'nnir (car (gnus-find-method-for-group group))))
+
+
 (defun nnir-read-parms (nnir-search-engine)
   "Reads additional search parameters according to `nnir-engines'."
   (let ((parmspec (caddr (assoc nnir-search-engine nnir-engines))))
@@ -1754,7 +1759,7 @@ environment unless `not-global' is non-nil."
 
 (defun nnir-possibly-change-group (group &optional server)
   (or (not server) (nnir-server-opened server) (nnir-open-server server))
-  (when (and group (string-match "\\`nnir" group))
+  (when (gnus-nnir-group-p group)
     (setq nnir-artlist (gnus-group-get-parameter
                        (gnus-group-prefixed-name
                         (gnus-group-short-name group) '(nnir "nnir"))