From 3f8780f217bf84a4e54b917920bd8c6bbe3cb7ef Mon Sep 17 00:00:00 2001 From: kaoru Date: Mon, 4 Jan 2010 07:30:57 +0000 Subject: [PATCH] * elmo.el (elmo-folder-confirm-appends): Use `number-to-string' instead of `int-to-string'. * elmo-archive.el (elmo-archive-message-fetch-internal) (elmo-archive-folder-message-make-temp-files) (elmo-archive-folder-append-buffer) (elmo-folder-delete-messages-internal) (elmo-archive-msgdb-create-entity) (elmo-archive-msgdb-create-as-numlist-subr2): Ditto. * elmo-util.el (elmo-cache-expire-by-age): Ditto. * elmo-flag.el (elmo-global-flag-set-internal): Ditto. * elmo-file.el (elmo-folder-message-make-temp-files): Ditto. * elmo-imap4.el (elmo-imap4-make-number-set-list) (elmo-folder-list-subfolders): Ditto. * elmo-localdir.el (elmo-message-file-name) (elmo-folder-message-make-temp-files) (elmo-localdir-msgdb-create-entity) (elmo-folder-append-messages-*-localdir) (elmo-folder-pack-numbers): Ditto. * elmo-maildir.el (elmo-folder-message-make-temp-files): Ditto. * elmo-map.el (elmo-location-map-key): Ditto. * elmo-nntp.el (elmo-nntp-folder-postfix) (elmo-nntp-folder-list-subfolders) (elmo-nntp-folder-msgdb-create): Ditto. --- elmo/ChangeLog | 24 ++++++++++++++++++++++++ elmo/elmo-archive.el | 17 +++++++++-------- elmo/elmo-file.el | 2 +- elmo/elmo-flag.el | 2 +- elmo/elmo-imap4.el | 4 ++-- elmo/elmo-localdir.el | 14 +++++++------- elmo/elmo-maildir.el | 2 +- elmo/elmo-map.el | 2 +- elmo/elmo-nntp.el | 8 ++++---- elmo/elmo-util.el | 4 ++-- elmo/elmo.el | 2 +- 11 files changed, 53 insertions(+), 28 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index a1689b1..60d4c72 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,5 +1,29 @@ 2010-01-04 TAKAHASHI Kaoru + * elmo.el (elmo-folder-confirm-appends): Use `number-to-string' + instead of `int-to-string'. + * elmo-archive.el (elmo-archive-message-fetch-internal) + (elmo-archive-folder-message-make-temp-files) + (elmo-archive-folder-append-buffer) + (elmo-folder-delete-messages-internal) + (elmo-archive-msgdb-create-entity) + (elmo-archive-msgdb-create-as-numlist-subr2): Ditto. + * elmo-util.el (elmo-cache-expire-by-age): Ditto. + * elmo-flag.el (elmo-global-flag-set-internal): Ditto. + * elmo-file.el (elmo-folder-message-make-temp-files): Ditto. + * elmo-imap4.el (elmo-imap4-make-number-set-list) + (elmo-folder-list-subfolders): Ditto. + * elmo-localdir.el (elmo-message-file-name) + (elmo-folder-message-make-temp-files) + (elmo-localdir-msgdb-create-entity) + (elmo-folder-append-messages-*-localdir) + (elmo-folder-pack-numbers): Ditto. + * elmo-maildir.el (elmo-folder-message-make-temp-files): Ditto. + * elmo-map.el (elmo-location-map-key): Ditto. + * elmo-nntp.el (elmo-nntp-folder-postfix) + (elmo-nntp-folder-list-subfolders) + (elmo-nntp-folder-msgdb-create): Ditto. + * elmo.el (elmo-crosspost-message-alist-save): Don't use `function' for `lambda'. * elmo-archive.el (elmo-archive-folder-list-subfolders) diff --git a/elmo/elmo-archive.el b/elmo/elmo-archive.el index 0c94f92..f0d3b84 100644 --- a/elmo/elmo-archive.el +++ b/elmo/elmo-archive.el @@ -560,7 +560,7 @@ TYPE specifies the archiver's symbol." (prefix (elmo-archive-folder-archive-prefix-internal folder)) (method (elmo-archive-get-method type 'cat)) (args (list arc (elmo-concat-path - prefix (int-to-string number))))) + prefix (number-to-string number))))) (and (file-exists-p arc) (as-binary-process (elmo-archive-call-method method args t)) @@ -600,7 +600,7 @@ TYPE specifies the archiver's symbol." (elmo-make-directory (directory-file-name tmp-dir)))) (setq newfile (elmo-concat-path prefix - (int-to-string next-num))) + (number-to-string next-num))) (elmo-bind-directory tmp-dir (if (and (or (functionp method) (car method)) @@ -703,7 +703,7 @@ TYPE specifies the archiver's symbol." (n-method (elmo-archive-get-method type 'ext)) (tmp-msgs (mapcar (lambda (x) (elmo-concat-path prefix - (int-to-string x))) numbers)) + (number-to-string x))) numbers)) number) ;; Expand files in the tmp-dir-src. (elmo-bind-directory @@ -730,7 +730,7 @@ TYPE specifies the archiver's symbol." tmp-dir-src) (expand-file-name (if start-number - (int-to-string number) + (number-to-string number) (file-name-nondirectory tmp-file)) tmp-dir-dst)) (if start-number (incf number))) @@ -778,7 +778,7 @@ TYPE specifies the archiver's symbol." (n-method (elmo-archive-get-method type 'rm)) (numbers (mapcar (lambda (x) (elmo-concat-path prefix - (int-to-string x))) + (number-to-string x))) numbers))) (cond ((functionp n-method) (funcall n-method (cons arc numbers))) @@ -921,7 +921,7 @@ TYPE specifies the archiver's symbol." method archive number type &optional prefix) - (let* ((msg (elmo-concat-path prefix (int-to-string number))) + (let* ((msg (elmo-concat-path prefix (number-to-string number))) (arg-list (list archive msg))) (when (elmo-archive-article-exists-p archive msg type) ;; insert article. @@ -991,7 +991,8 @@ 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 (number-to-string x))) + msgs) "\n")) (as-binary-process (apply 'call-process-region (point-min) (point-max) @@ -1048,7 +1049,7 @@ TYPE specifies the archiver's symbol." (let* ((type (elmo-archive-folder-archive-type-internal folder)) (arc (elmo-archive-get-archive-name folder)) (method (elmo-archive-get-method type 'cat)) - (args (list arc (elmo-concat-path prefix (int-to-string number))))) + (args (list arc (elmo-concat-path prefix (number-to-string number))))) (elmo-set-work-buf (when (file-exists-p arc) (as-binary-process diff --git a/elmo/elmo-file.el b/elmo/elmo-file.el index da33f4e..572528a 100644 --- a/elmo/elmo-file.el +++ b/elmo/elmo-file.el @@ -181,7 +181,7 @@ (elmo-copy-file (elmo-message-file-name folder number) (expand-file-name - (int-to-string (if start-number cur-number number)) + (number-to-string (if start-number cur-number number)) temp-dir)) (incf cur-number)) temp-dir)) diff --git a/elmo/elmo-flag.el b/elmo/elmo-flag.el index b7e4e71..7765a8a 100644 --- a/elmo/elmo-flag.el +++ b/elmo/elmo-flag.el @@ -322,7 +322,7 @@ NUMBER is the message number." 1)) (setq new-file (expand-file-name - (int-to-string + (number-to-string (setq new-number (elmo-flag-folder-max-number-internal flag-folder))) (elmo-localdir-folder-directory-internal flag-folder))) diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index ac1456f..d1193c2 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -860,7 +860,7 @@ If CHOP-LENGTH is not specified, message set is not chopped." (cond ((consp x) (format "%s:%s" (car x) (cdr x))) ((integerp x) - (int-to-string x)))) + (number-to-string x)))) cont-list ",")) set-list))) @@ -2007,7 +2007,7 @@ Return nil if no complete line has arrived." (elmo-net-folder-server-internal folder)))) (unless (eq (elmo-net-folder-port-internal folder) elmo-imap4-default-port) (setq append-serv (concat append-serv ":" - (int-to-string + (number-to-string (elmo-net-folder-port-internal folder))))) (setq type (elmo-net-folder-stream-type-internal folder)) (unless (eq (elmo-network-stream-type-symbol type) diff --git a/elmo/elmo-localdir.el b/elmo/elmo-localdir.el index 935762d..9651f8a 100644 --- a/elmo/elmo-localdir.el +++ b/elmo/elmo-localdir.el @@ -109,7 +109,7 @@ (luna-define-method elmo-message-file-name ((folder elmo-localdir-folder) number) - (expand-file-name (int-to-string number) + (expand-file-name (number-to-string number) (elmo-localdir-folder-directory-internal folder))) (luna-define-method elmo-folder-message-file-number-p ((folder @@ -134,10 +134,10 @@ (dolist (number numbers) (elmo-copy-file (expand-file-name - (int-to-string number) + (number-to-string number) (elmo-localdir-folder-directory-internal folder)) (expand-file-name - (int-to-string (if start-number cur-number number)) + (number-to-string (if start-number cur-number number)) temp-dir)) (incf cur-number)) temp-dir)) @@ -145,7 +145,7 @@ (defun elmo-localdir-msgdb-create-entity (msgdb dir number) (elmo-msgdb-create-message-entity-from-file (elmo-msgdb-message-entity-handler msgdb) - number (expand-file-name (int-to-string number) dir))) + number (expand-file-name (number-to-string number) dir))) (luna-define-method elmo-folder-msgdb-create ((folder elmo-localdir-folder) numbers @@ -219,7 +219,7 @@ (elmo-copy-file (elmo-message-file-name src-folder (car numbers)) (expand-file-name - (int-to-string + (number-to-string (if same-number (car numbers) next-num)) dir)) ;; save flag-table only when src folder's msgdb is loaded. @@ -332,8 +332,8 @@ (elmo-bind-directory dir ;; xxx nfs,hardlink - (rename-file (int-to-string old-number) - (int-to-string new-number) t)) + (rename-file (number-to-string old-number) + (number-to-string new-number) t)) (elmo-message-entity-set-number entity new-number)) (elmo-msgdb-append-entity new-msgdb entity (elmo-msgdb-flags msgdb old-number)) diff --git a/elmo/elmo-maildir.el b/elmo/elmo-maildir.el index 9e1ee28..a2393ef 100644 --- a/elmo/elmo-maildir.el +++ b/elmo/elmo-maildir.el @@ -477,7 +477,7 @@ file name for maildir directories." (elmo-copy-file (elmo-message-file-name folder number) (expand-file-name - (int-to-string (if start-number cur-number number)) + (number-to-string (if start-number cur-number number)) temp-dir)) (incf cur-number)) temp-dir)) diff --git a/elmo/elmo-map.el b/elmo/elmo-map.el index 7bd64c7..0ba69ff 100644 --- a/elmo/elmo-map.el +++ b/elmo/elmo-map.el @@ -58,7 +58,7 @@ (defmacro elmo-location-map-key (number) - `(concat "#" (int-to-string ,number))) + `(concat "#" (number-to-string ,number))) (defun elmo-location-map-load (location-map directory) (elmo-location-map-setup diff --git a/elmo/elmo-nntp.el b/elmo/elmo-nntp.el index cd91eb1..b7d35f7 100644 --- a/elmo/elmo-nntp.el +++ b/elmo/elmo-nntp.el @@ -257,7 +257,7 @@ Don't cache if nil.") (if (and port (null (eq port elmo-nntp-default-port))) (concat ":" (if (numberp port) - (int-to-string port) port))) + (number-to-string port) port))) (unless (eq (elmo-network-stream-type-symbol type) elmo-nntp-default-stream-type) (elmo-network-stream-type-spec-string type)))) @@ -585,7 +585,7 @@ Don't cache if nil.") "@" (elmo-net-folder-server-internal folder)))) (unless (eq (elmo-net-folder-port-internal folder) elmo-nntp-default-port) (setq append-serv (concat append-serv - ":" (int-to-string + ":" (number-to-string (elmo-net-folder-port-internal folder))))) (unless (eq (elmo-network-stream-type-symbol (elmo-net-folder-stream-type-internal folder)) @@ -781,8 +781,8 @@ Don't cache if nil.") session (format "xover %s-%s" - (int-to-string cur) - (int-to-string + (number-to-string cur) + (number-to-string (+ cur elmo-nntp-overview-fetch-chop-length)))) (with-current-buffer (elmo-network-session-buffer session) diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index e206ebd..e7934df 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -2111,12 +2111,12 @@ If KBYTES is kilo bytes (This value must be float)." "Expire cache file by age. Optional argument DAYS specifies the days to expire caches." (interactive) - (let ((age (or (and days (int-to-string days)) + (let ((age (or (and days (number-to-string days)) (and (interactive-p) (read-from-minibuffer (format "Enter days (%s): " elmo-cache-expire-default-age))) - (int-to-string elmo-cache-expire-default-age))) + (number-to-string elmo-cache-expire-default-age))) (dirs (directory-files elmo-cache-directory t "^[^\\.]")) diff --git a/elmo/elmo.el b/elmo/elmo.el index d45b2c5..007e63c 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -1497,7 +1497,7 @@ If Optional LOCAL is non-nil, don't update server flag." (catch 'end (while t (setq in (read-from-minibuffer "Update number: " - (int-to-string in)) + (number-to-string in)) in (string-to-number in)) (if (< len in) (throw 'end len)) -- 1.7.10.4