(nnir-group-server): DTRT when called on native groups. The
authorAndreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
Fri, 9 Jun 2006 21:01:10 +0000 (21:01 +0000)
committerAndreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
Fri, 9 Jun 2006 21:01:10 +0000 (21:01 +0000)
macro is called on groups without checking for foreigness,
although the docstring stated it was only for foreign ones.

contrib/ChangeLog
contrib/nnir.el

index ed37d88..02ec435 100644 (file)
@@ -1,3 +1,9 @@
+2006-06-09  Andreas Seltenreich  <uwi7@rz.uni-karlsruhe.de>
+
+       * nnir.el (nnir-group-server): DTRT when called on native groups.  The
+       macro is called on groups without checking for foreigness, although the
+       docstring stated it was only for foreign ones.
+
 2006-06-08  Andreas Seltenreich  <uwi7@rz.uni-karlsruhe.de>
 
        * nnir.el (nnir-retrieve-headers): Bind gnus-override-method before
index 77503f4..3ee585b 100644 (file)
@@ -704,16 +704,17 @@ that it is for Namazu, not Glimpse."
 (add-hook 'gnus-group-mode-hook 'nnir-group-mode-hook)
 
 (defmacro nnir-group-server (group)
-  "Return the server for a foreign newsgroup GROUP.
+  "Return the server for a newsgroup GROUP.
 The returned format is as `gnus-server-to-method' needs it.  See
 `gnus-group-real-prefix' and `gnus-group-real-name'."
   `(let ((gname ,group))
      (if (string-match "^\\([^:]+\\):" gname)
-        (setq gname (match-string 1 gname))
-       nil)
-     (if (string-match "^\\([^+]+\\)\\+\\(.+\\)$" gname)
-        (format "%s:%s" (match-string 1 gname) (match-string 2 gname))
-       (concat gname ":"))))
+        (progn
+          (setq gname (match-string 1 gname))
+          (if (string-match "^\\([^+]+\\)\\+\\(.+\\)$" gname)
+              (format "%s:%s" (match-string 1 gname) (match-string 2 gname))
+            (concat gname ":")))
+       "native")))
 
 ;; Summary mode commands.