emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master d35b6a49b3: Fix gnus-html-image-cache-ttl FIXME


From: Paul Eggert
Subject: master d35b6a49b3: Fix gnus-html-image-cache-ttl FIXME
Date: Tue, 26 Apr 2022 16:54:48 -0400 (EDT)

branch: master
commit d35b6a49b33b534f7653bec4d03ab2513a15dc4f
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>

    Fix gnus-html-image-cache-ttl FIXME
    
    * lisp/gnus/gnus-html.el (gnus-html-image-cache-ttl):
    Make it a seconds count.
---
 etc/NEWS               |  6 ++++++
 lisp/gnus/gnus-html.el | 12 ++++--------
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 19434ec85b..a2818c8bf7 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -940,6 +940,12 @@ representation as emojis.
 Configuration is very similar to the notmuch and namazu backends.  It
 supports the unified search syntax.
 
+---
+*** gnus-html-image-cache-ttl is now a seconds count.
+Formerly it was a pair of numbers (A B) that represented 65536*A + B,
+to cater to older Emacs implementations that lacked bignums.
+The older form still works but is undocumented.
+
 ** EIEIO
 
 +++
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el
index 8b2200af54..87f3ee6362 100644
--- a/lisp/gnus/gnus-html.el
+++ b/lisp/gnus/gnus-html.el
@@ -40,15 +40,11 @@
 (require 'help-fns)
 (require 'url-queue)
 
-(defcustom gnus-html-image-cache-ttl (days-to-time 7)
-  "Time used to determine if we should use images from the cache."
-  :version "24.1"
+(defcustom gnus-html-image-cache-ttl (time-convert (days-to-time 7) 'integer)
+  "Number of seconds used to determine if we should use images from the cache."
+  :version "29.1"
   :group 'gnus-art
-  ;; FIXME hardly the friendliest type.  The allowed value is actually
-  ;; any time value, but we are assuming no-one cares about USEC and
-  ;; PSEC here.  It would be better to make it a number of seconds.
-  :type '(choice (cons integer integer)
-                (list integer integer)))
+  :type 'number)
 
 (defcustom gnus-html-image-automatic-caching t
   "Whether automatically cache retrieve images."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]