(gnus-warp-to-article): Limit registry warping to real groups.
authorDave Abrahams <dave@boostpro.com>
Sun, 10 Jun 2012 22:00:09 +0000 (00:00 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 10 Jun 2012 22:00:09 +0000 (00:00 +0200)
lisp/ChangeLog
lisp/gnus-int.el

index 90ae9da..03d9f8a 100644 (file)
@@ -1,3 +1,8 @@
+2012-06-10  Dave Abrahams  <dave@boostpro.com>
+
+       * gnus-int.el (gnus-warp-to-article): Limit registry warping to real
+       groups.
+
 2012-06-10  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * mm-decode.el (mm-display-part): Dissect archives when hitting `RET'
index bc98693..18e56ed 100644 (file)
@@ -587,14 +587,15 @@ This is the string that Gnus uses to identify the group."
   "Warps from an article in a virtual group to the article in its
 real group. Does nothing on a real group."
   (interactive)
-  (let ((gnus-command-method
-        (gnus-find-method-for-group gnus-newsgroup-name)))
-    (or
-     (when (gnus-check-backend-function
-            'warp-to-article (car gnus-command-method))
-       (funcall (gnus-get-function gnus-command-method 'warp-to-article)))
-     (and (bound-and-true-p gnus-registry-enabled)
-         (gnus-try-warping-via-registry)))))
+  (when (gnus-virtual-group-p gnus-newsgroup-name)
+    (let ((gnus-command-method
+           (gnus-find-method-for-group gnus-newsgroup-name)))
+      (or
+       (when (gnus-check-backend-function
+              'warp-to-article (car gnus-command-method))
+         (funcall (gnus-get-function gnus-command-method 'warp-to-article)))
+       (and (bound-and-true-p gnus-registry-enabled)
+            (gnus-try-warping-via-registry))))))
 
 (defun gnus-request-head (article group)
   "Request the head of ARTICLE in GROUP."