(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
(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)
gnus-nocem-real-group-hashtb)
;; Valid group.
(beginning-of-line)
- (while (= (following-char) ?\t)
+ (while (eq (char-after) ?\t)
(forward-line -1))
(setq id (buffer-substring (point) (1- (search-forward "\t"))))
(unless (gnus-gethash id gnus-nocem-hashtb)
(gnus-sethash id t gnus-nocem-hashtb)
(push id ncm))
(forward-line 1)
- (while (= (following-char) ?\t)
+ (while (eq (char-after) ?\t)
(forward-line 1))))))
(when ncm
(setq gnus-nocem-touched-alist t)
"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 ()
(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)