Mercurial > emacs
comparison lisp/gnus/mail-source.el @ 111282:8fecec59e268
Silence mail-source.el compilation.
* lisp/gnus/mail-source.el (nnheader-message, gnus-float-time): Autoload.
(mail-source-delete-crash-box): Use gnus-float-time.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sun, 31 Oct 2010 18:56:28 -0700 |
parents | 236342431786 |
children | 417b1e4d63cd |
comparison
equal
deleted
inserted
replaced
111281:ce591845861c | 111282:8fecec59e268 |
---|---|
499 (eval value)) | 499 (eval value)) |
500 ;; Just return the value. | 500 ;; Just return the value. |
501 (t | 501 (t |
502 value))) | 502 value))) |
503 | 503 |
504 (autoload 'nnheader-message "nnheader") | |
505 | |
504 (defun mail-source-fetch (source callback &optional method) | 506 (defun mail-source-fetch (source callback &optional method) |
505 "Fetch mail from SOURCE and call CALLBACK zero or more times. | 507 "Fetch mail from SOURCE and call CALLBACK zero or more times. |
506 CALLBACK will be called with the name of the file where (some of) | 508 CALLBACK will be called with the name of the file where (some of) |
507 the mail from SOURCE is put. | 509 the mail from SOURCE is put. |
508 Return the number of files that were found." | 510 Return the number of files that were found." |
592 (when (file-exists-p mail-source-crash-box) | 594 (when (file-exists-p mail-source-crash-box) |
593 (delete-file mail-source-crash-box)) | 595 (delete-file mail-source-crash-box)) |
594 0) | 596 0) |
595 (funcall callback mail-source-crash-box info))) | 597 (funcall callback mail-source-crash-box info))) |
596 | 598 |
599 (autoload 'gnus-float-time "gnus-util") | |
600 | |
597 (defvar mail-source-incoming-last-checked-time nil) | 601 (defvar mail-source-incoming-last-checked-time nil) |
598 | 602 |
599 (defun mail-source-delete-crash-box () | 603 (defun mail-source-delete-crash-box () |
600 (when (file-exists-p mail-source-crash-box) | 604 (when (file-exists-p mail-source-crash-box) |
601 ;; Delete or move the incoming mail out of the way. | 605 ;; Delete or move the incoming mail out of the way. |
612 ;; remove old incoming files? | 616 ;; remove old incoming files? |
613 (when (natnump mail-source-delete-incoming) | 617 (when (natnump mail-source-delete-incoming) |
614 ;; Don't check for old incoming files more than once per day to | 618 ;; Don't check for old incoming files more than once per day to |
615 ;; save a lot of file accesses. | 619 ;; save a lot of file accesses. |
616 (when (or (null mail-source-incoming-last-checked-time) | 620 (when (or (null mail-source-incoming-last-checked-time) |
617 (> (time-to-seconds | 621 (> (gnus-float-time |
618 (time-since mail-source-incoming-last-checked-time)) | 622 (time-since mail-source-incoming-last-checked-time)) |
619 (* 24 60 60))) | 623 (* 24 60 60))) |
620 (setq mail-source-incoming-last-checked-time (current-time)) | 624 (setq mail-source-incoming-last-checked-time (current-time)) |
621 (mail-source-delete-old-incoming | 625 (mail-source-delete-old-incoming |
622 mail-source-delete-incoming | 626 mail-source-delete-incoming |