gmm-utils.el (gmm-called-interactively-p): Restore as a macro.
[gnus] / lisp / gnus-int.el
index 9898060..bc3ba18 100644 (file)
@@ -581,9 +581,8 @@ real group. Does nothing on a real group."
        (and (bound-and-true-p gnus-registry-enabled)
             (gnus-try-warping-via-registry))))))
 
-(defun gnus-request-head (article group &optional to-buffer)
-  "Request the head of ARTICLE in GROUP.
-If TO-BUFFER, insert the article in that buffer."
+(defun gnus-request-head (article group)
+  "Request the head of ARTICLE in GROUP."
   (let* ((gnus-command-method (gnus-find-method-for-group group))
         (head (gnus-get-function gnus-command-method 'request-head t))
         res clean-up)
@@ -600,16 +599,15 @@ If TO-BUFFER, insert the article in that buffer."
            clean-up t))
      ;; Use `head' function.
      ((fboundp head)
-      (setq res (funcall head article (gnus-group-real-name group)
-                        (nth 1 gnus-command-method)
-                         to-buffer)))
+      (setq res (funcall head article
+                         (and (not gnus-override-method) (gnus-group-real-name group))
+                        (nth 1 gnus-command-method))))
      ;; Use `article' function.
      (t
-      (setq res (gnus-request-article article group to-buffer)
+      (setq res (gnus-request-article article group)
            clean-up t)))
     (when clean-up
-      (with-current-buffer (or to-buffer
-                               nntp-server-buffer)
+      (with-current-buffer nntp-server-buffer
        (goto-char (point-min))
        (when (search-forward "\n\n" nil t)
          (delete-region (1- (point)) (point-max)))
@@ -709,6 +707,10 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
 
 (defun gnus-request-expire-articles (articles group &optional force)
   (let* ((gnus-command-method (gnus-find-method-for-group group))
+         ;; Filter out any negative article numbers; they can't be
+         ;; expired here.
+         (articles
+          (delq nil (mapcar (lambda (n) (and (>= n 0) n)) articles)))
         (gnus-inhibit-demon t)
         (not-deleted
          (funcall