comparison lisp/mail/rmailsum.el @ 62402:a7e02ef1e3d6

Replace `string-to-int' by `string-to-number'.
author Juanma Barranquero <lekktu@gmail.com>
date Mon, 16 May 2005 11:33:47 +0000
parents c4870e121489
children 4bce01bf6006 f042e7c0fe20
comparison
equal deleted inserted replaced
62401:4512c4db6912 62402:a7e02ef1e3d6
373 (if (not (re-search-forward "^Date:" nil t)) 373 (if (not (re-search-forward "^Date:" nil t))
374 " " 374 " "
375 (cond ((re-search-forward "\\([^0-9:]\\)\\([0-3]?[0-9]\\)\\([- \t_]+\\)\\([adfjmnos][aceopu][bcglnprtvy]\\)" 375 (cond ((re-search-forward "\\([^0-9:]\\)\\([0-3]?[0-9]\\)\\([- \t_]+\\)\\([adfjmnos][aceopu][bcglnprtvy]\\)"
376 (save-excursion (end-of-line) (point)) t) 376 (save-excursion (end-of-line) (point)) t)
377 (format "%2d-%3s" 377 (format "%2d-%3s"
378 (string-to-int (buffer-substring 378 (string-to-number (buffer-substring
379 (match-beginning 2) 379 (match-beginning 2)
380 (match-end 2))) 380 (match-end 2)))
381 (buffer-substring 381 (buffer-substring
382 (match-beginning 4) (match-end 4)))) 382 (match-beginning 4) (match-end 4))))
383 ((re-search-forward "\\([^a-z]\\)\\([adfjmnos][acepou][bcglnprtvy]\\)\\([-a-z \t_]*\\)\\([0-9][0-9]?\\)" 383 ((re-search-forward "\\([^a-z]\\)\\([adfjmnos][acepou][bcglnprtvy]\\)\\([-a-z \t_]*\\)\\([0-9][0-9]?\\)"
384 (save-excursion (end-of-line) (point)) t) 384 (save-excursion (end-of-line) (point)) t)
385 (format "%2d-%3s" 385 (format "%2d-%3s"
386 (string-to-int (buffer-substring 386 (string-to-number (buffer-substring
387 (match-beginning 4) 387 (match-beginning 4)
388 (match-end 4))) 388 (match-end 4)))
389 (buffer-substring 389 (buffer-substring
390 (match-beginning 2) (match-end 2)))) 390 (match-beginning 2) (match-end 2))))
391 ((re-search-forward "\\(19\\|20\\)\\([0-9][0-9]\\)-\\([01][0-9]\\)-\\([0-3][0-9]\\)" 391 ((re-search-forward "\\(19\\|20\\)\\([0-9][0-9]\\)-\\([01][0-9]\\)-\\([0-3][0-9]\\)"
392 (save-excursion (end-of-line) (point)) t) 392 (save-excursion (end-of-line) (point)) t)
393 (format "%2s%2s%2s" 393 (format "%2s%2s%2s"
578 (not (eobp)) 578 (not (eobp))
579 (not (bobp)))) 579 (not (bobp))))
580 ;; Advance thru summary. 580 ;; Advance thru summary.
581 (forward-line (if forward 1 -1)) 581 (forward-line (if forward 1 -1))
582 ;; Get msg number of this line. 582 ;; Get msg number of this line.
583 (setq i (string-to-int 583 (setq i (string-to-number
584 (buffer-substring (point) 584 (buffer-substring (point)
585 (min (point-max) (+ 6 (point)))))) 585 (min (point-max) (+ 6 (point))))))
586 ;; See if that msg has desired subject. 586 ;; See if that msg has desired subject.
587 (save-excursion 587 (save-excursion
588 (set-buffer rmail-buffer) 588 (set-buffer rmail-buffer)
789 ;; If at end of buffer, pretend we are on the last text line. 789 ;; If at end of buffer, pretend we are on the last text line.
790 (if (eobp) 790 (if (eobp)
791 (forward-line -1)) 791 (forward-line -1))
792 (beginning-of-line) 792 (beginning-of-line)
793 (skip-chars-forward " ") 793 (skip-chars-forward " ")
794 (let ((msg-num (string-to-int (buffer-substring 794 (let ((msg-num (string-to-number (buffer-substring
795 (point) 795 (point)
796 (progn (skip-chars-forward "0-9") 796 (progn (skip-chars-forward "0-9")
797 (point)))))) 797 (point))))))
798 ;; Always leave `unseen' removed 798 ;; Always leave `unseen' removed
799 ;; if we get out of isearch mode. 799 ;; if we get out of isearch mode.
800 ;; Don't let a subsequent isearch restore that `unseen'. 800 ;; Don't let a subsequent isearch restore that `unseen'.
801 (if (not isearch-mode) 801 (if (not isearch-mode)
802 (setq rmail-summary-put-back-unseen nil)) 802 (setq rmail-summary-put-back-unseen nil))
1059 (beginning-of-line) 1059 (beginning-of-line)
1060 (let* ((obuf (current-buffer)) 1060 (let* ((obuf (current-buffer))
1061 (buf rmail-buffer) 1061 (buf rmail-buffer)
1062 (cur (point)) 1062 (cur (point))
1063 message-not-found 1063 message-not-found
1064 (curmsg (string-to-int 1064 (curmsg (string-to-number
1065 (buffer-substring (point) 1065 (buffer-substring (point)
1066 (min (point-max) (+ 6 (point)))))) 1066 (min (point-max) (+ 6 (point))))))
1067 (total (save-excursion (set-buffer buf) rmail-total-messages))) 1067 (total (save-excursion (set-buffer buf) rmail-total-messages)))
1068 ;; If message number N was specified, find that message's line 1068 ;; If message number N was specified, find that message's line
1069 ;; or set message-not-found. 1069 ;; or set message-not-found.