Stop `url-queue' downloads on group exit.
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 12 Feb 2012 19:36:51 +0000 (20:36 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 12 Feb 2012 19:36:51 +0000 (20:36 +0100)
* gnus-art.el (gnus-stop-downloads): Stop `url-queue' downloads on
group exit.

lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-sum.el

index 3bf2c84..00e53e1 100644 (file)
@@ -1,5 +1,8 @@
 2012-02-12  Lars Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-art.el (gnus-stop-downloads): Stop `url-queue' downloads on
+       group exit.
+
        * nnimap.el (nnimap-parse-flags): Parse correctly when we have mixed
        QRESYNC/FETCH output.
 
index b282afd..8fa50df 100644 (file)
@@ -45,6 +45,7 @@
 (require 'mm-uu)
 (require 'message)
 (require 'mouse)
+(require 'url-queue)
 
 (autoload 'gnus-msg-mail "gnus-msg" nil t)
 (autoload 'gnus-button-mailto "gnus-msg")
@@ -4582,6 +4583,9 @@ commands:
     (when (eq (elt timer 5) 'image-animate-timeout)
       (cancel-timer timer))))
 
+(defun gnus-stop-downloads ()
+  (setq url-queue nil))
+
 ;; Set article window start at LINE, where LINE is the number of lines
 ;; from the head of the article.
 (defun gnus-article-set-window-start (&optional line)
index 4316efa..8ae8d0b 100644 (file)
@@ -7319,6 +7319,7 @@ If FORCE (the prefix), also save the .newsrc file(s)."
       (when (gnus-buffer-live-p gnus-article-buffer)
        (with-current-buffer gnus-article-buffer
          (gnus-article-stop-animations)
+         (gnus-stop-downloads)
          (mm-destroy-parts gnus-article-mime-handles)
          ;; Set it to nil for safety reason.
          (setq gnus-article-mime-handle-alist nil)
@@ -9656,6 +9657,7 @@ C-u g', show the raw article."
       (when (gnus-buffer-live-p gnus-article-buffer)
        (with-current-buffer gnus-article-buffer
          (gnus-article-stop-animations)
+         (gnus-stop-downloads)
          (mm-destroy-parts gnus-article-mime-handles)
          ;; Set it to nil for safety reason.
          (setq gnus-article-mime-handle-alist nil)