X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fgnus-nocem.el;h=d678531dcc9233e3c7fd6a4ed30f41c8f4fe6518;hb=7bd51e7e85c1b314c2f2d00ebb26678762820d73;hp=7535a25831923c427816e2dae521eda870558e2e;hpb=a414e3562d72f3f0c677acf65003ca339171dcc2;p=elisp%2Fgnus.git- diff --git a/lisp/gnus-nocem.el b/lisp/gnus-nocem.el index 7535a25..d678531 100644 --- a/lisp/gnus-nocem.el +++ b/lisp/gnus-nocem.el @@ -146,7 +146,7 @@ matches an previously scanned and verified nocem message." (save-excursion (let ((dependencies (make-vector 10 nil)) headers header) - (with-temp-buffer + (nnheader-temp-write nil (setq headers (if (eq 'nov (gnus-retrieve-headers @@ -190,9 +190,9 @@ matches an previously scanned and verified nocem message." (let ((date (mail-header-date header)) issuer b e type) (when (or (not date) - (time-less-p - (time-since (date-to-time date)) - (days-to-time gnus-nocem-expiry-wait))) + (nnmail-time-less + (nnmail-time-since (nnmail-date-to-time date)) + (nnmail-days-to-time gnus-nocem-expiry-wait))) (gnus-request-article-this-buffer (mail-header-number header) group) (goto-char (point-min)) (when (re-search-forward "-----BEGIN PGP MESSAGE-----" nil t) @@ -302,13 +302,13 @@ matches an previously scanned and verified nocem message." "Save the NoCeM cache." (when (and gnus-nocem-alist gnus-nocem-touched-alist) - (with-temp-file (gnus-nocem-cache-file) + (nnheader-temp-write (gnus-nocem-cache-file) (gnus-prin1 `(setq gnus-nocem-alist ',gnus-nocem-alist))) (setq gnus-nocem-touched-alist nil))) (defun gnus-nocem-save-active () "Save the NoCeM active file." - (with-temp-file (gnus-nocem-active-file) + (nnheader-temp-write (gnus-nocem-active-file) (gnus-prin1 `(setq gnus-nocem-active ',gnus-nocem-active)))) (defun gnus-nocem-alist-to-hashtb () @@ -316,11 +316,11 @@ matches an previously scanned and verified nocem message." (let* ((alist gnus-nocem-alist) (pprev (cons nil alist)) (prev pprev) - (expiry (days-to-time gnus-nocem-expiry-wait)) + (expiry (nnmail-days-to-time gnus-nocem-expiry-wait)) entry) (setq gnus-nocem-hashtb (gnus-make-hashtable (* (length alist) 51))) (while (setq entry (car alist)) - (if (not (time-less-p (time-since (car entry)) expiry)) + (if (not (nnmail-time-less (nnmail-time-since (car entry)) expiry)) ;; This entry has expired, so we remove it. (setcdr prev (cdr alist)) (setq prev alist)