From 382d7519f582a3d8dc6b524b5bf002510bcc9338 Mon Sep 17 00:00:00 2001 From: kaoru Date: Mon, 4 Jan 2010 05:40:46 +0000 Subject: [PATCH] * elmo.el (elmo-crosspost-message-alist-save): Don't use `function' for `lambda'. * elmo-archive.el (elmo-archive-folder-list-subfolders) (elmo-folder-append-messages-*-archive) (elmo-folder-delete-messages-internal): Ditto. * elmo-date.el (elmo-replace-in-string): Ditto. * elmo-multi.el (elmo-folder-list-messages, elmo-folder-search) (elmo-folder-list-flagged): Ditto. * elmo-maildir.el (elmo-maildir-cleanup-temporal): Ditto. * elmo-imap4.el (elmo-network-authenticate-session): Ditto. * modb-standard.el (modb-standard-cleanup-stale-entities): Ditto. --- elmo/ChangeLog | 14 +++++++++++++ elmo/elmo-archive.el | 54 ++++++++++++++++++++++++------------------------- elmo/elmo-date.el | 35 ++++++++++++++++---------------- elmo/elmo-imap4.el | 17 ++++++++-------- elmo/elmo-maildir.el | 26 ++++++++++++------------ elmo/elmo-multi.el | 31 +++++++++++++--------------- elmo/elmo.el | 4 ++-- elmo/modb-standard.el | 8 ++++---- 8 files changed, 99 insertions(+), 90 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index a161173..a1689b1 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,17 @@ +2010-01-04 TAKAHASHI Kaoru + + * elmo.el (elmo-crosspost-message-alist-save): Don't use + `function' for `lambda'. + * elmo-archive.el (elmo-archive-folder-list-subfolders) + (elmo-folder-append-messages-*-archive) + (elmo-folder-delete-messages-internal): Ditto. + * elmo-date.el (elmo-replace-in-string): Ditto. + * elmo-multi.el (elmo-folder-list-messages, elmo-folder-search) + (elmo-folder-list-flagged): Ditto. + * elmo-maildir.el (elmo-maildir-cleanup-temporal): Ditto. + * elmo-imap4.el (elmo-network-authenticate-session): Ditto. + * modb-standard.el (modb-standard-cleanup-stale-entities): Ditto. + 2010-01-02 TAKAHASHI Kaoru * elmo-dop.el (elmo-dop-spool-folder): Suppress warning "defsubst diff --git a/elmo/elmo-archive.el b/elmo/elmo-archive.el index 29a9d63..0c94f92 100644 --- a/elmo/elmo-archive.el +++ b/elmo/elmo-archive.el @@ -508,7 +508,7 @@ TYPE specifies the archiver's symbol." nil))) (regexp (format "^\\(.*\\)\\(%s\\)$" (mapconcat - '(lambda (x) (regexp-quote (cdr x))) + (lambda (x) (regexp-quote (cdr x))) elmo-archive-suffix-alist "\\|")))) (if (string-match "\\(.*\\)/$" base-folder) ; ends with '/'. @@ -518,29 +518,29 @@ TYPE specifies the archiver's symbol." (delq nil (mapcar - '(lambda (x) - (when (and (string-match regexp x) - (eq suffix - (car - (rassoc (elmo-match-string 2 x) - elmo-archive-suffix-alist)))) - (format "%s%s;%s%s" - (elmo-folder-prefix-internal folder) - (elmo-concat-path base-folder (elmo-match-string 1 x)) - suffix prefix))) + (lambda (x) + (when (and (string-match regexp x) + (eq suffix + (car + (rassoc (elmo-match-string 2 x) + elmo-archive-suffix-alist)))) + (format "%s%s;%s%s" + (elmo-folder-prefix-internal folder) + (elmo-concat-path base-folder (elmo-match-string 1 x)) + suffix prefix))) flist))) (elmo-mapcar-list-of-list - (function (lambda (x) - (if (file-exists-p - (expand-file-name - (concat elmo-archive-basename - (elmo-archive-get-suffix - (elmo-archive-folder-archive-type-internal - folder))) - (expand-file-name - x - (elmo-archive-folder-path folder)))) - (concat (elmo-folder-prefix-internal folder) x)))) + (lambda (x) + (if (file-exists-p + (expand-file-name + (concat elmo-archive-basename + (elmo-archive-get-suffix + (elmo-archive-folder-archive-type-internal + folder))) + (expand-file-name + x + (elmo-archive-folder-path folder)))) + (concat (elmo-folder-prefix-internal folder) x))) (elmo-list-subdirectories (elmo-archive-folder-path folder) (or (elmo-archive-folder-dir-name-internal folder) "") @@ -667,7 +667,7 @@ TYPE specifies the archiver's symbol." (setq base-dir (expand-file-name ".." temp-dir))) (setq files (mapcar - '(lambda (x) (elmo-concat-path prefix x)) + (lambda (x) (elmo-concat-path prefix x)) (directory-files temp-dir nil "^[^\\.]"))) (unless (elmo-archive-append-files folder base-dir @@ -776,9 +776,9 @@ TYPE specifies the archiver's symbol." (arc (elmo-archive-get-archive-name folder)) (p-method (elmo-archive-get-method type 'rm-pipe)) (n-method (elmo-archive-get-method type 'rm)) - (numbers (mapcar '(lambda (x) (elmo-concat-path - prefix - (int-to-string x))) + (numbers (mapcar (lambda (x) (elmo-concat-path + prefix + (int-to-string x))) numbers))) (cond ((functionp n-method) (funcall n-method (cons arc numbers))) @@ -991,7 +991,7 @@ TYPE specifies the archiver's symbol." (insert (mapconcat 'concat - (mapcar '(lambda (x) (elmo-concat-path prefix (int-to-string x))) msgs) + (mapcar (lambda (x) (elmo-concat-path prefix (int-to-string x))) msgs) "\n")) (as-binary-process (apply 'call-process-region (point-min) (point-max) diff --git a/elmo/elmo-date.el b/elmo/elmo-date.el index 7a4fe4c..7d986ea 100644 --- a/elmo/elmo-date.el +++ b/elmo/elmo-date.el @@ -72,24 +72,23 @@ Otherwise treat \\ in NEWTEXT string as special: (substring str prev-start match) (cond (literal newtext) (t (mapconcat - (function - (lambda (c) - (if special - (progn - (setq special nil) - (cond ((eq c ?\\) "\\") - ((eq c ?&) - (elmo-match-string 0 str)) - ((and (>= c ?0) (<= c ?9)) - (if (> c (+ ?0 (length - (match-data)))) - ;; Invalid match num - (error "Invalid match num: %c" c) - (setq c (- c ?0)) - (elmo-match-string c str))) - (t (char-to-string c)))) - (if (eq c ?\\) (progn (setq special t) nil) - (char-to-string c))))) + (lambda (c) + (if special + (progn + (setq special nil) + (cond ((eq c ?\\) "\\") + ((eq c ?&) + (elmo-match-string 0 str)) + ((and (>= c ?0) (<= c ?9)) + (if (> c (+ ?0 (length + (match-data)))) + ;; Invalid match num + (error "Invalid match num: %c" c) + (setq c (- c ?0)) + (elmo-match-string c str))) + (t (char-to-string c)))) + (if (eq c ?\\) (progn (setq special t) nil) + (char-to-string c)))) newtext "")))))) (concat rtn-str (substring str start)))) diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index 0eb9b56..ac1456f 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -1025,15 +1025,15 @@ If CHOP-LENGTH is not specified, message set is not chopped." (sasl-mechanisms (delq nil (mapcar - '(lambda (cap) - (if (string-match "^auth=\\(.*\\)$" - (symbol-name cap)) - (match-string 1 (upcase (symbol-name cap))))) + (lambda (cap) + (if (string-match "^auth=\\(.*\\)$" + (symbol-name cap)) + (match-string 1 (upcase (symbol-name cap))))) (elmo-imap4-session-capability-internal session)))) (mechanism (sasl-find-mechanism (delq nil - (mapcar '(lambda (cap) (upcase (symbol-name cap))) + (mapcar (lambda (cap) (upcase (symbol-name cap))) (if (listp auth) auth (list auth)))))) ;) @@ -1064,10 +1064,9 @@ If CHOP-LENGTH is not specified, message set is not chopped." session (intern (downcase name))) (setq sasl-read-passphrase - (function - (lambda (prompt) - (elmo-get-passwd - (elmo-network-session-password-key session))))) + (lambda (prompt) + (elmo-get-passwd + (elmo-network-session-password-key session)))) (setq tag (elmo-imap4-send-command session diff --git a/elmo/elmo-maildir.el b/elmo/elmo-maildir.el index c236770..9e1ee28 100644 --- a/elmo/elmo-maildir.el +++ b/elmo/elmo-maildir.el @@ -256,19 +256,19 @@ LOCATION." (let ((cur-time (current-time)) (count 0) last-accessed) - (mapcar (function - (lambda (file) - (setq last-accessed (nth 4 (file-attributes file))) - (when (or (> (- (car cur-time)(car last-accessed)) 1) - (and (eq (- (car cur-time)(car last-accessed)) 1) - (> (- (cadr cur-time)(cadr last-accessed)) - 64064))) ; 36 hours. - (message "Maildir: %d tmp file(s) are cleared." - (setq count (1+ count))) - (delete-file file)))) - (directory-files (expand-file-name "tmp" dir) - t ; full - "^[^.].*$" t)))) + (mapcar + (lambda (file) + (setq last-accessed (nth 4 (file-attributes file))) + (when (or (> (- (car cur-time)(car last-accessed)) 1) + (and (eq (- (car cur-time)(car last-accessed)) 1) + (> (- (cadr cur-time)(cadr last-accessed)) + 64064))) ; 36 hours. + (message "Maildir: %d tmp file(s) are cleared." + (setq count (1+ count))) + (delete-file file))) + (directory-files (expand-file-name "tmp" dir) + t ; full + "^[^.].*$" t)))) (defun elmo-maildir-update-current (folder) "Move all new msgs to cur in the maildir." diff --git a/elmo/elmo-multi.el b/elmo/elmo-multi.el index c95d4ab..2e52de3 100644 --- a/elmo/elmo-multi.el +++ b/elmo/elmo-multi.el @@ -353,11 +353,10 @@ (nconc numbers (mapcar - (function - (lambda (x) - (+ - (* (elmo-multi-folder-divide-number-internal - folder) cur-number) x))) + (lambda (x) + (+ + (* (elmo-multi-folder-divide-number-internal + folder) cur-number) x)) list))) (setq flds (cdr flds))) numbers)) @@ -405,13 +404,12 @@ (setq cur-number (+ cur-number 1)) (setq matches (append matches (mapcar - (function - (lambda (x) - (+ - (* (elmo-multi-folder-divide-number-internal - folder) - cur-number) - x))) + (lambda (x) + (+ + (* (elmo-multi-folder-divide-number-internal + folder) + cur-number) + x)) (elmo-folder-search (car flds) condition)))) (setq flds (cdr flds))) @@ -497,11 +495,10 @@ (nconc numbers (mapcar - (function - (lambda (x) - (+ - (* (elmo-multi-folder-divide-number-internal folder) - cur-number) x))) + (lambda (x) + (+ + (* (elmo-multi-folder-divide-number-internal folder) + cur-number) x)) (elmo-folder-list-flagged child flag in-msgdb))))) numbers)) diff --git a/elmo/elmo.el b/elmo/elmo.el index 9919a84..d45b2c5 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -1775,8 +1775,8 @@ Return a hashtable for newsgroups." (while alist (setq newsgroups (elmo-delete-if - '(lambda (x) - (not (intern-soft x elmo-newsgroups-hashtb))) + (lambda (x) + (not (intern-soft x elmo-newsgroups-hashtb))) (nth 1 (car alist)))) (if newsgroups (setcar (cdar alist) newsgroups) diff --git a/elmo/modb-standard.el b/elmo/modb-standard.el index f710dd3..1082887 100644 --- a/elmo/modb-standard.el +++ b/elmo/modb-standard.el @@ -253,11 +253,11 @@ (concat "^" modb-standard-entity-filename "-\\([0-9]+\\)")) (entities (elmo-uniq-list (mapcar - #'(lambda (x) (/ x modb-standard-divide-number)) + (lambda (x) (/ x modb-standard-divide-number)) (modb-standard-number-list-internal modb)))) - (files (mapcar #'(lambda(x) - (when (string-match entity-regex x) - (string-to-number (match-string 1 x)))) + (files (mapcar (lambda(x) + (when (string-match entity-regex x) + (string-to-number (match-string 1 x)))) (directory-files path nil entity-regex)))) (dolist (entity (car (elmo-list-diff-nonsortable files entities))) (ignore-errors (delete-file -- 1.7.10.4