nnir.el (nnir-request-move-article): Bail out if no move support in group.
authorAndrew Cohen <cohen@andy.bu.edu>
Mon, 29 Nov 2010 12:55:15 +0000 (07:55 -0500)
committerAndrew Cohen <cohen@andy.bu.edu>
Mon, 29 Nov 2010 12:55:15 +0000 (07:55 -0500)
lisp/ChangeLog
lisp/nnir.el

index fef502c..b5d6c9a 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-29  Andrew Cohen  <cohen@andy.bu.edu>
+
+       * nnir.el (nnir-request-move-article): Bail out if original group
+       doesn't support article moves.
+
 2010-11-29  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * shr.el (shr-find-fill-point): Don't break before apostrophes.
index e64374e..b49c99e 100644 (file)
@@ -488,8 +488,7 @@ The category key for a member of the sequence is obtained
 as `(keyfunc member)' and the corresponding element is just
 `member'. If `valuefunc' is non-nil, the element of the list
 is `(valuefunc member)'."
-  `(if (null ,sequence)
-       nil
+  `(unless (null ,sequence)
      (let (value)
        (mapcar
        (lambda (member)
@@ -642,6 +641,9 @@ is `(valuefunc member)'."
         (artsubject (mail-header-subject
                      (gnus-data-header
                       (assoc article (gnus-data-list nil))))))
+    (unless (gnus-check-backend-function
+            'request-move-article artfullgroup)
+      (error "The group %s does not support article moving" artfullgroup))
     (setq gnus-newsgroup-original-name artfullgroup)
     (string-match "^\\[[0-9]+:.+/[0-9]+\\] " artsubject)
     (setq gnus-article-original-subject (substring artsubject (match-end 0)))