From c887cd278db9c7728fcd4475b5b4ee3d885fd3ca Mon Sep 17 00:00:00 2001 From: kaoru Date: Mon, 18 Feb 2008 02:20:52 +0000 Subject: [PATCH] Use `string-to-number' instead of `string-to-int'. --- wl/ChangeLog | 32 ++++++++++++++++++++++++++++++++ wl/wl-dnd.el | 2 +- wl/wl-draft.el | 2 +- wl/wl-expire.el | 2 +- wl/wl-folder.el | 6 +++--- wl/wl-score.el | 10 +++++----- wl/wl-summary.el | 4 ++-- wl/wl-thread.el | 4 ++-- wl/wl-util.el | 10 +++++----- wl/wl.el | 2 +- 10 files changed, 53 insertions(+), 21 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 12d589d..5fca710 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,35 @@ +2008-02-18 TAKAHASHI Kaoru + + * wl.el (wl-plugged-toggle): Use `string-to-number' instead of + `string-to-int'. + + * wl-util.el (wl-unique-id): Use `string-to-number' instead of + `string-to-int'. + + * wl-thread.el (wl-thread-jump-to-msg, wl-thread-set-parent): Use + `string-to-number' instead of `string-to-int'. + + * wl-summary.el (wl-summary-get-list-info) + (wl-summary-message-number): Use `string-to-number' instead of + `string-to-int'. + + * wl-score.el (wl-score-overview-entity-get-lines) + (wl-score-set-mark-below, wl-score-set-expunge-below) + (wl-summary-increase-score, wl-score-get-header-entry): Use + `string-to-number' instead of `string-to-int'. + + * wl-folder.el (wl-folder-update-diff-line): Use + `string-to-number' instead of `string-to-int'. + + * wl-expire.el (wl-expire-archive-number2): Use `string-to-number' + instead of `string-to-int'. + + * wl-draft.el (wl-jump-to-draft-folder): Use `string-to-number' + instead of `string-to-int'. + + * wl-dnd.el (wl-dnd-drop-func): Use `string-to-number' instead of + `string-to-int'. + 2008-02-17 TAKAHASHI Kaoru * wl-util.el (wl-match-string, wl-match-buffer) diff --git a/wl/wl-dnd.el b/wl/wl-dnd.el index 10a3502..248effb 100644 --- a/wl/wl-dnd.el +++ b/wl/wl-dnd.el @@ -59,7 +59,7 @@ (split-string (nth 2 (car (cdr object))) " "))) (src-fld (nth 0 src-spec)) - (number (string-to-int (nth 1 src-spec))) + (number (string-to-number (nth 1 src-spec))) target) (setq target (wl-folder-get-folder-name-by-id (get-text-property diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 5ddbc1c..530f913 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -2407,7 +2407,7 @@ Automatically applied in draft sending time." (message "No draft message exist.") (if (string-match (concat "^" wl-draft-folder "/") mybuf) (setq msg (cadr (memq - (string-to-int (substring mybuf (match-end 0))) + (string-to-number (substring mybuf (match-end 0))) msgs)))) (or msg (setq msg (car msgs))) (if (setq buf (get-buffer (format "%s/%d" wl-draft-folder msg))) diff --git a/wl/wl-expire.el b/wl/wl-expire.el index d687c95..28d4ca9 100644 --- a/wl/wl-expire.el +++ b/wl/wl-expire.el @@ -387,7 +387,7 @@ Refile to archive folder followed the number of message in one archive folder." (setq dels (nth 1 tmp))) (wl-append deleted-list (car (wl-expire-delete folder dels)))) (setq delete-list (car tmp) - filenum (string-to-int (nth 3 tmp)) + filenum (string-to-number (nth 3 tmp)) len (nth 4 tmp) arc-len len) (catch 'done diff --git a/wl/wl-folder.el b/wl/wl-folder.el index aa32365..7edd76c 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -2198,11 +2198,11 @@ Use `wl-subscribed-mailing-list'." (setq is-group (get-text-property (point) 'wl-folder-is-group)) (when (looking-at "^[ ]*\\(.*\\):\\([0-9\\*-]*\\)/\\([0-9\\*-]*\\)/\\([0-9\\*]*\\)") ;;(looking-at "^[ ]*\\([^\\[].+\\):\\([0-9\\*-]*/[0-9\\*-]*/[0-9\\*]*\\)") - (setq cur-new (string-to-int + (setq cur-new (string-to-number (wl-match-buffer 2))) - (setq cur-unread (string-to-int + (setq cur-unread (string-to-number (wl-match-buffer 3))) - (setq cur-all (string-to-int + (setq cur-all (string-to-number (wl-match-buffer 4))) (delete-region (match-beginning 2) (match-end 4)) diff --git a/wl/wl-score.el b/wl/wl-score.el index d598bdf..8847ba7 100644 --- a/wl/wl-score.el +++ b/wl/wl-score.el @@ -166,7 +166,7 @@ Remove Re, Was, Fwd etc." (defun wl-score-overview-entity-get-lines (entity) (let ((lines (elmo-message-entity-field entity 'lines))) (and lines - (string-to-int lines)))) + (string-to-number lines)))) (defun wl-score-overview-entity-get-xref (entity) (or (elmo-message-entity-field entity 'xref) @@ -815,7 +815,7 @@ Set `wl-score-cache' nil." "Automatically mark messages with score below SCORE as read." (interactive (list (or (and current-prefix-arg (prefix-numeric-value current-prefix-arg)) - (string-to-int (read-string "Mark below: "))))) + (string-to-number (read-string "Mark below: "))))) (setq score (or score wl-summary-default-score 0)) (wl-score-set 'mark (list score)) (wl-score-set 'touched '(t)) @@ -826,7 +826,7 @@ Set `wl-score-cache' nil." "Automatically expunge messages with score below SCORE." (interactive (list (or (and current-prefix-arg (prefix-numeric-value current-prefix-arg)) - (string-to-int (read-string "Expunge below: "))))) + (string-to-number (read-string "Expunge below: "))))) (setq score (or score wl-summary-default-score 0)) (wl-score-set 'expunge (list score)) (wl-score-set 'touched '(t))) @@ -872,7 +872,7 @@ Set `wl-score-cache' nil." ;; transform from string to int. (when (eq (nth 1 (assoc (car entry) wl-score-header-index)) 'wl-score-integer) - (setq match (string-to-int match))) + (setq match (string-to-number match))) ;; set score (if score (setq lscore rscore) @@ -1061,7 +1061,7 @@ Set `wl-score-cache' nil." ;; read the score. (unless (or score increase) - (setq score (string-to-int (read-string "Set score: "))))) + (setq score (string-to-number (read-string "Set score: "))))) (message "") (wl-score-kill-help-buffer)) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 51079a8..fbc15ae 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -1003,7 +1003,7 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'." (count (elmo-find-list-match-value elmo-mailing-list-count-spec-list getter))) - (cons name (and count (string-to-int count))))))) + (cons name (and count (string-to-number count))))))) (defun wl-summary-overview-entity-compare-by-list-info (x y) "Compare entity X and Y by mailing-list info." @@ -2153,7 +2153,7 @@ This function is defined for `window-scroll-functions'" (beginning-of-line) (if (or (re-search-forward "\r\\(-?[0-9]+\\)" (point-at-eol) t) (re-search-forward "^ *\\(-?[0-9]+\\)" (point-at-eol) t)) - (string-to-int (wl-match-buffer 1)) + (string-to-number (wl-match-buffer 1)) nil))) (defun wl-summary-delete-all-msgs () diff --git a/wl/wl-thread.el b/wl/wl-thread.el index 5ac6e9d..82a0c83 100644 --- a/wl/wl-thread.el +++ b/wl/wl-thread.el @@ -295,7 +295,7 @@ ENTITY is returned." "Jump to the message with specified number in the current summary." (interactive) (let ((num (or number - (string-to-int + (string-to-number (read-from-minibuffer "Jump to Message(No.): "))))) (wl-thread-entity-force-open (wl-thread-get-entity num)) (wl-summary-jump-to-msg num))) @@ -1092,7 +1092,7 @@ Message is inserted to the summary buffer." (if (string= dst-parent "") (setq dst-parent nil) (if (interactive-p) - (setq dst-parent (string-to-int dst-parent)) + (setq dst-parent (string-to-number dst-parent)) (setq dst-parent parent-number))) (if (and dst-parent (memq dst-parent (wl-thread-get-children-msgs number))) diff --git a/wl/wl-util.el b/wl/wl-util.el index 3c1f4ad..6869de5 100644 --- a/wl/wl-util.el +++ b/wl/wl-util.el @@ -600,11 +600,11 @@ that `read' can handle, whenever this is possible." ("Jul" . "07") ("Aug" . "08") ("Sep" . "09") ("Oct" . "10") ("Nov" . "11") ("Dec" . "12")))))) - (list (string-to-int (concat (nth 6 cts) m - (substring (nth 2 cts) 0 1))) - (string-to-int (concat (substring (nth 2 cts) 1) - (nth 4 cts) (nth 5 cts) - (nth 6 cts)))))))) + (list (string-to-number (concat (nth 6 cts) m + (substring (nth 2 cts) 0 1))) + (string-to-number (concat (substring (nth 2 cts) 1) + (nth 4 cts) (nth 5 cts) + (nth 6 cts)))))))) (concat (if (memq system-type '(ms-dos emx vax-vms)) (let ((user (downcase (user-login-name)))) diff --git a/wl/wl.el b/wl/wl.el index d1db27a..ccc8269 100644 --- a/wl/wl.el +++ b/wl/wl.el @@ -531,7 +531,7 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'." ((eq indent wl-plugged-port-indent) ;; toggle port plug (cond ((string-match "\\([^([]*\\)(\\([^)[]+\\))" name) - (setq port (string-to-int (elmo-match-string 2 name))) + (setq port (string-to-number (elmo-match-string 2 name))) (if (string-match "!" (setq name-1 (elmo-match-string 1 name))) (setq stream-type (intern (substring name-1 (match-end 0)))))) -- 1.7.10.4