X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=blobdiff_plain;f=lisp%2Fgravatar.el;h=8e5ea313e4a2965406c86f151f9fa453cfaac152;hp=985ed2c7b0d733b48acdce11c0f38457701bd535;hb=b52037f4a9c6bee1ff556c22750e158da1208d4b;hpb=c5af57ca918b418af80f1174fdae5022bed489e7 diff --git a/lisp/gravatar.el b/lisp/gravatar.el index 985ed2c7b..8e5ea313e 100644 --- a/lisp/gravatar.el +++ b/lisp/gravatar.el @@ -1,6 +1,6 @@ ;;; gravatar.el --- Get Gravatars -;; Copyright (C) 2010-2013 Free Software Foundation, Inc. +;; Copyright (C) 2010-2016 Free Software Foundation, Inc. ;; Author: Julien Danjou ;; Keywords: news @@ -33,19 +33,25 @@ :group 'comm) (defcustom gravatar-automatic-caching t - "Whether cache retrieved gravatar." + "Whether to cache retrieved gravatars." + :type 'boolean :group 'gravatar) +;; FIXME a time value is not the nicest format for a custom variable. (defcustom gravatar-cache-ttl (days-to-time 30) "Time to live for gravatar cache entries." + :type '(repeat integer) :group 'gravatar) +;; FIXME Doc is tautological. What are the options? (defcustom gravatar-rating "g" "Default rating for gravatar." + :type 'string :group 'gravatar) (defcustom gravatar-size 32 "Default size in pixels for gravatars." + :type 'integer :group 'gravatar) (defconst gravatar-base-url @@ -132,9 +138,7 @@ 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 (if (featurep 'xemacs) - (url-retrieve url) - (url-retrieve-synchronously url)) + (with-current-buffer (url-retrieve-synchronously url) (when gravatar-automatic-caching (url-store-in-cache (current-buffer))) (let ((data (gravatar-data->image)))