Use `url-queue-retrieve', if it exists.
[gnus] / lisp / gnus-html.el
index 7c0d63f..f380d07 100644 (file)
@@ -386,16 +386,14 @@ Use ALT-TEXT for the image string."
   "Retrieve IMAGE, and place it into BUFFER on arrival."
   (gnus-message 8 "gnus-html-schedule-image-fetching: buffer %s, image %s"
                 buffer image)
-  (let ((args (list (car image)
-                   'gnus-html-image-fetched
-                   (list buffer image))))
-    (when (> (length (if (featurep 'xemacs)
-                        (cdr (split-string (function-arglist 'url-retrieve)))
-                      (help-function-arglist 'url-retrieve)))
-            4)
-      (setq args (nconc args (list t))))
+  (if (fboundp 'url-queue-retrieve)
+      (url-queue-retrieve (car image)
+                         'gnus-html-image-fetched
+                         (list buffer image) t)
     (ignore-errors
-      (push (apply #'url-retrieve args) gnus-buffers))))
+      (url-retrieve (car image)
+                   'gnus-html-image-fetched
+                   (list buffer image)))))
 
 (defun gnus-html-image-fetched (status buffer image)
   "Callback function called when image has been fetched."