Use `url-retrieve' on XEmacs, since it doesn't have url-retrieve-synchronously.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Thu, 17 Mar 2011 18:53:07 +0000 (19:53 +0100)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Thu, 17 Mar 2011 18:53:07 +0000 (19:53 +0100)
lisp/ChangeLog
lisp/dgnushack.el
lisp/gravatar.el

index a3e0f6d..43f3719 100644 (file)
@@ -1,5 +1,10 @@
 2011-03-17  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * dgnushack.el: Define url-retrieve-synchronously unless not defined.
+
+       * gravatar.el (gravatar-retrieve-synchronously): Use `url-retrieve' on
+       XEmacs, since it doesn't have url-retrieve-synchronously.
+
        * time-date.el (format-seconds): Use assoc instead of assoc-string,
        since assoc-string doesn't exist in XEmacs.
 
index d5f8d01..9fa42d3 100644 (file)
     (autoload 'iswitchb-read-buffer "iswitchb")
     (autoload 'netrc-credentials "netrc")
     (defalias 'x-defined-colors 'ignore)
+    (unless (fboundp 'url-retrieve-synchronously)
+      (defalias 'url-retrieve-synchronously 'url-retrieve))
     (defalias 'read-color 'ignore)))
 
 (eval-and-compile
index 0c97080..4b0c9a1 100644 (file)
@@ -129,8 +129,10 @@ You can provide a list of argument to pass to CB in CBARGS."
   "Retrieve MAIL-ADDRESS gravatar and returns it."
   (let ((url (gravatar-build-url mail-address)))
     (if (gravatar-cache-expired url)
-        (with-current-buffer (url-retrieve-synchronously url)
-          (when gravatar-automatic-caching
+        (with-current-buffer (if (featurep 'xemacs)
+                                (url-retrieve url)
+                              (url-retrieve-synchronously url))
+         (when gravatar-automatic-caching
             (url-store-in-cache (current-buffer)))
           (let ((data (gravatar-data->image)))
             (kill-buffer (current-buffer))