]> code.delx.au - gnu-emacs/blobdiff - lisp/gnus/nnir.el
gnus-msg.el: Fix detection of nnir group
[gnu-emacs] / lisp / gnus / nnir.el
index e7d004a8b2c31b88de4aaa40d29843c26b4e9e8f..b96f0c1cb789a9621cc31002688943aa35c149f3 100644 (file)
@@ -1707,6 +1707,12 @@ actually)."
 
 ;;; Util Code:
 
+(defun gnus-nnir-group-p (group)
+  "Say whether GROUP is nnir or not."
+  (if (gnus-group-prefixed-p group)
+      (eq 'nnir (car (gnus-find-method-for-group group)))
+    (and group (string-match "^nnir" 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 +1760,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"))