summaryrefslogtreecommitdiff
path: root/lisp/gnus/nneething.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus/nneething.el')
-rw-r--r--lisp/gnus/nneething.el21
1 files changed, 12 insertions, 9 deletions
diff --git a/lisp/gnus/nneething.el b/lisp/gnus/nneething.el
index abd17c55086..10ac7025505 100644
--- a/lisp/gnus/nneething.el
+++ b/lisp/gnus/nneething.el
@@ -215,8 +215,9 @@ included.")
(setq nneething-map
(mapcar (lambda (n)
(list (cdr n) (car n)
- (nth 5 (file-attributes
- (nneething-file-name (car n))))))
+ (file-attribute-modification-time
+ (file-attributes
+ (nneething-file-name (car n))))))
nneething-map)))
;; Remove files matching the exclusion regexp.
(when nneething-exclude-files
@@ -244,7 +245,7 @@ included.")
(while map
(if (and (member (cadr (car map)) files)
;; We also remove files that have changed mod times.
- (equal (nth 5 (file-attributes
+ (equal (file-attribute-modification-time (file-attributes
(nneething-file-name (cadr (car map)))))
(cadr (cdar map))))
(progn
@@ -262,7 +263,7 @@ included.")
(setq touched t)
(setcdr nneething-active (1+ (cdr nneething-active)))
(push (list (cdr nneething-active) (car files)
- (nth 5 (file-attributes
+ (file-attribute-modification-time (file-attributes
(nneething-file-name (car files)))))
nneething-map))
(setq files (cdr files)))
@@ -318,15 +319,17 @@ included.")
"Subject: " (file-name-nondirectory file) (or extra-msg "") "\n"
"Message-ID: <nneething-" (nneething-encode-file-name file)
"@" (system-name) ">\n"
- (if (equal '(0 0) (nth 5 atts)) ""
- (concat "Date: " (current-time-string (nth 5 atts)) "\n"))
+ (if (zerop (float-time (file-attribute-modification-time atts))) ""
+ (concat "Date: "
+ (current-time-string (file-attribute-modification-time atts))
+ "\n"))
(or (when buffer
(with-current-buffer buffer
(when (re-search-forward "<[a-zA-Z0-9_]@[-a-zA-Z0-9_]>" 1000 t)
(concat "From: " (match-string 0) "\n"))))
- (nneething-from-line (nth 2 atts) file))
- (if (> (string-to-number (int-to-string (nth 7 atts))) 0)
- (concat "Chars: " (int-to-string (nth 7 atts)) "\n")
+ (nneething-from-line (file-attribute-user-id atts) file))
+ (if (> (file-attribute-size atts) 0)
+ (concat "Chars: " (int-to-string (file-attribute-size atts)) "\n")
"")
(if buffer
(with-current-buffer buffer