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.
(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
"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))