Commit e9bd5782 authored by Miles Bader's avatar Miles Bader
Browse files

Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-339

Merge from gnus--rel--5.10

Patches applied:

 * gnus--rel--5.10  (patch 76)

   - Update from CVS

2005-05-30  Reiner Steib  <Reiner.Steib@gmx.de>

   * lisp/gnus/gnus-agent.el (gnus-agent-regenerate-group)
   (gnus-agent-fetch-articles): Replace `string-to-int' by
   `string-to-number'.
   * lisp/gnus/gnus-art.el (gnus-button-fetch-group): Ditto.
   * lisp/gnus/gnus-cache.el (gnus-cache-generate-active)
   (gnus-cache-articles-in-group): Ditto.
   * lisp/gnus/gnus-group.el (gnus-group-set-current-level)
   (gnus-group-insert-group-line): Ditto.
   * lisp/gnus/gnus-score.el (gnus-score-set-expunge-below)
   (gnus-score-set-mark-below, gnus-summary-score-effect)
   (gnus-summary-score-entry): Ditto.
   * lisp/gnus/gnus-soup.el (gnus-soup-send-packet, gnus-soup-parse-areas)
   (gnus-soup-pack): Ditto.
   * lisp/gnus/gnus-spec.el (gnus-xmas-format): Ditto.
   * lisp/gnus/gnus-start.el (gnus-newsrc-to-gnus-format): Ditto.
   * lisp/gnus/gnus-sum.el (gnus-create-xref-hashtb): Ditto.
   * lisp/gnus/gnus-uu.el (gnus-uu-expand-numbers): Ditto.
   * lisp/gnus/nnbabyl.el (nnbabyl-article-group-number): Ditto.
   * lisp/gnus/nndb.el (nndb-get-remote-expire-response): Ditto.
   * lisp/gnus/nndiary.el (nndiary-parse-schedule-value)
   (nndiary-string-to-number, nndiary-request-replace-article)
   (nndiary-request-article): Ditto.
   * lisp/gnus/nndoc.el (nndoc-rnews-body-end, nndoc-mbox-body-end): Ditto.
   * lisp/gnus/nndraft.el (nndraft-articles, nndraft-request-group): Ditto.
   * lisp/gnus/nneething.el (nneething-make-head): Ditto.
   * lisp/gnus/nnfolder.el (nnfolder-request-article)
   (nnfolder-retrieve-headers): Ditto.
   * lisp/gnus/nnheader.el (nnheader-file-to-number): Ditto.
   * lisp/gnus/nnkiboze.el (nnkiboze-request-article): Ditto.
   * lisp/gnus/nnmail.el (nnmail-process-unix-mail-format)
   (nnmail-process-babyl-mail-format): Ditto.
   * lisp/gnus/nnmbox.el (nnmbox-read-mbox, nnmbox-article-group-number): Ditto.
   * lisp/gnus/nnmh.el (nnmh-update-gnus-unreads, nnmh-active-number)
   (nnmh-request-create-group, nnmh-request-list-1)
   (nnmh-request-group, nnmh-request-article): Ditto.
   * lisp/gnus/nnml.el (nnml-request-replace-article, nnml-request-article): Ditto.
   * lisp/gnus/nnrss.el (nnrss-find-rss-via-syndic8): Ditto.
   * lisp/gnus/nnsoup.el (nnsoup-make-active): Ditto.
   * lisp/gnus/nnspool.el (nnspool-find-id, nnspool-request-group): Ditto.
   * lisp/gnus/nntp.el (nntp-find-group-and-number)
   (nntp-retrieve-headers-with-xover): Ditto.
   * lisp/gnus/pgg-gpg.el (pgg-gpg-snarf-keys-region): Ditto.
   * lisp/gnus/pgg-parse.el (pgg-read-body, pgg-read-bytes)
   (pgg-format-key-identifier): Ditto.
   * lisp/gnus/pop3.el (pop3-last, pop3-stat): Ditto.
   * lisp/gnus/qp.el (quoted-printable-decode-region): Ditto.

   * lisp/gnus/spam-report.el (spam-report-url-ping-mm-url): Use format instead
   of concat.
parent 6b5341d3
2005-05-30 Reiner Steib <Reiner.Steib@gmx.de>
* gnus-agent.el (gnus-agent-regenerate-group)
(gnus-agent-fetch-articles): Replace `string-to-int' by
`string-to-number'.
* gnus-art.el (gnus-button-fetch-group): Ditto.
* gnus-cache.el (gnus-cache-generate-active)
(gnus-cache-articles-in-group): Ditto.
* gnus-group.el (gnus-group-set-current-level)
(gnus-group-insert-group-line): Ditto.
* gnus-score.el (gnus-score-set-expunge-below)
(gnus-score-set-mark-below, gnus-summary-score-effect)
(gnus-summary-score-entry): Ditto.
* gnus-soup.el (gnus-soup-send-packet, gnus-soup-parse-areas)
(gnus-soup-pack): Ditto.
* gnus-spec.el (gnus-xmas-format): Ditto.
* gnus-start.el (gnus-newsrc-to-gnus-format): Ditto.
* gnus-sum.el (gnus-create-xref-hashtb): Ditto.
* gnus-uu.el (gnus-uu-expand-numbers): Ditto.
* nnbabyl.el (nnbabyl-article-group-number): Ditto.
* nndb.el (nndb-get-remote-expire-response): Ditto.
* nndiary.el (nndiary-parse-schedule-value)
(nndiary-string-to-number, nndiary-request-replace-article)
(nndiary-request-article): Ditto.
* nndoc.el (nndoc-rnews-body-end, nndoc-mbox-body-end): Ditto.
* nndraft.el (nndraft-articles, nndraft-request-group): Ditto.
* nneething.el (nneething-make-head): Ditto.
* nnfolder.el (nnfolder-request-article)
(nnfolder-retrieve-headers): Ditto.
* nnheader.el (nnheader-file-to-number): Ditto.
* nnkiboze.el (nnkiboze-request-article): Ditto.
* nnmail.el (nnmail-process-unix-mail-format)
(nnmail-process-babyl-mail-format): Ditto.
* nnmbox.el (nnmbox-read-mbox, nnmbox-article-group-number): Ditto.
* nnmh.el (nnmh-update-gnus-unreads, nnmh-active-number)
(nnmh-request-create-group, nnmh-request-list-1)
(nnmh-request-group, nnmh-request-article): Ditto.
* nnml.el (nnml-request-replace-article, nnml-request-article): Ditto.
* nnrss.el (nnrss-find-rss-via-syndic8): Ditto.
* nnsoup.el (nnsoup-make-active): Ditto.
* nnspool.el (nnspool-find-id, nnspool-request-group): Ditto.
* nntp.el (nntp-find-group-and-number)
(nntp-retrieve-headers-with-xover): Ditto.
* pgg-gpg.el (pgg-gpg-snarf-keys-region): Ditto.
* pgg-parse.el (pgg-read-body, pgg-read-bytes)
(pgg-format-key-identifier): Ditto.
* pop3.el (pop3-last, pop3-stat): Ditto.
* qp.el (quoted-printable-decode-region): Ditto.
* spam-report.el (spam-report-url-ping-mm-url): Use format instead
of concat.
2005-05-30 Katsumi Yamaoka <yamaoka@jpl.org> 2005-05-30 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-agent.el (gnus-category-mode): Use gnus-run-mode-hooks. * gnus-agent.el (gnus-category-mode): Use gnus-run-mode-hooks.
......
...@@ -1540,7 +1540,7 @@ downloaded into the agent." ...@@ -1540,7 +1540,7 @@ downloaded into the agent."
(while (looking-at "\\([^: \n]+\\):\\([0-9]+\\) *") (while (looking-at "\\([^: \n]+\\):\\([0-9]+\\) *")
(push (cons (buffer-substring (match-beginning 1) (push (cons (buffer-substring (match-beginning 1)
(match-end 1)) (match-end 1))
(string-to-int (string-to-number
(buffer-substring (match-beginning 2) (buffer-substring (match-beginning 2)
(match-end 2)))) (match-end 2))))
crosses) crosses)
...@@ -3703,7 +3703,7 @@ If REREAD is not nil, downloaded articles are marked as unread." ...@@ -3703,7 +3703,7 @@ If REREAD is not nil, downloaded articles are marked as unread."
(dir (file-name-directory file)) (dir (file-name-directory file))
point point
(downloaded (if (file-exists-p dir) (downloaded (if (file-exists-p dir)
(sort (mapcar (lambda (name) (string-to-int name)) (sort (mapcar (lambda (name) (string-to-number name))
(directory-files dir nil "^[0-9]+$" t)) (directory-files dir nil "^[0-9]+$" t))
'>) '>)
(progn (gnus-make-directory dir) nil))) (progn (gnus-make-directory dir) nil)))
......
...@@ -6787,7 +6787,7 @@ specified by `gnus-button-alist'." ...@@ -6787,7 +6787,7 @@ specified by `gnus-button-alist'."
(match-string 3 address) (match-string 3 address)
"nntp"))) "nntp")))
nil nil nil nil nil nil
(and (match-end 6) (list (string-to-int (match-string 6 address)))))))) (and (match-end 6) (list (string-to-number (match-string 6 address))))))))
(defun gnus-url-parse-query-string (query &optional downcase) (defun gnus-url-parse-query-string (query &optional downcase)
(let (retval pairs cur key val) (let (retval pairs cur key val)
......
...@@ -487,7 +487,7 @@ Returns the list of articles removed." ...@@ -487,7 +487,7 @@ Returns the list of articles removed."
articles) articles)
(when (file-exists-p dir) (when (file-exists-p dir)
(setq articles (setq articles
(sort (mapcar (lambda (name) (string-to-int name)) (sort (mapcar (lambda (name) (string-to-number name))
(directory-files dir nil "^[0-9]+$" t)) (directory-files dir nil "^[0-9]+$" t))
'<)) '<))
;; Update the cache active file, just to synch more. ;; Update the cache active file, just to synch more.
...@@ -681,7 +681,7 @@ If LOW, update the lower bound instead." ...@@ -681,7 +681,7 @@ If LOW, update the lower bound instead."
;; Separate articles from all other files and directories. ;; Separate articles from all other files and directories.
(while files (while files
(if (string-match "^[0-9]+$" (file-name-nondirectory (car files))) (if (string-match "^[0-9]+$" (file-name-nondirectory (car files)))
(push (string-to-int (file-name-nondirectory (pop files))) nums) (push (string-to-number (file-name-nondirectory (pop files))) nums)
(push (pop files) alphs))) (push (pop files) alphs)))
;; If we have nums, then this is probably a valid group. ;; If we have nums, then this is probably a valid group.
(when (setq nums (sort nums '<)) (when (setq nums (sort nums '<))
......
...@@ -1452,7 +1452,7 @@ if it is a string, only list groups matching REGEXP." ...@@ -1452,7 +1452,7 @@ if it is a string, only list groups matching REGEXP."
(eval gnus-group-line-format-spec))) (eval gnus-group-line-format-spec)))
`(gnus-group ,(gnus-intern-safe gnus-tmp-group gnus-active-hashtb) `(gnus-group ,(gnus-intern-safe gnus-tmp-group gnus-active-hashtb)
gnus-unread ,(if (numberp number) gnus-unread ,(if (numberp number)
(string-to-int gnus-tmp-number-of-unread) (string-to-number gnus-tmp-number-of-unread)
t) t)
gnus-marked ,gnus-tmp-marked-mark gnus-marked ,gnus-tmp-marked-mark
gnus-indentation ,gnus-group-indentation gnus-indentation ,gnus-group-indentation
...@@ -3246,7 +3246,7 @@ Uses the process/prefix convention." ...@@ -3246,7 +3246,7 @@ Uses the process/prefix convention."
(progn (progn
(unless (gnus-group-process-prefix current-prefix-arg) (unless (gnus-group-process-prefix current-prefix-arg)
(error "No group on the current line")) (error "No group on the current line"))
(string-to-int (string-to-number
(let ((s (read-string (let ((s (read-string
(format "Level (default %s): " (format "Level (default %s): "
(or (gnus-group-group-level) (or (gnus-group-group-level)
......
...@@ -826,7 +826,7 @@ If optional argument `EXTRA' is non-nil, it's a non-standard overview header." ...@@ -826,7 +826,7 @@ If optional argument `EXTRA' is non-nil, it's a non-standard overview header."
;; If this is an integer comparison, we transform from string to int. ;; If this is an integer comparison, we transform from string to int.
(if (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer) (if (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer)
(if (stringp match) (if (stringp match)
(setq match (string-to-int match))) (setq match (string-to-number match)))
(set-text-properties 0 (length match) nil match)) (set-text-properties 0 (length match) nil match))
(unless (eq date 'now) (unless (eq date 'now)
...@@ -891,7 +891,7 @@ EXTRA is the possible non-standard header." ...@@ -891,7 +891,7 @@ EXTRA is the possible non-standard header."
t) t)
(read-string "Match: ") (read-string "Match: ")
(if (y-or-n-p "Use regexp match? ") 'r 's) (if (y-or-n-p "Use regexp match? ") 'r 's)
(string-to-int (read-string "Score: ")))) (string-to-number (read-string "Score: "))))
(save-excursion (save-excursion
(unless (and (stringp match) (> (length match) 0)) (unless (and (stringp match) (> (length match) 0))
(error "No match")) (error "No match"))
...@@ -945,7 +945,7 @@ EXTRA is the possible non-standard header." ...@@ -945,7 +945,7 @@ EXTRA is the possible non-standard header."
"Automatically mark articles with score below SCORE as read." "Automatically mark articles with score below SCORE as read."
(interactive (interactive
(list (or (and current-prefix-arg (prefix-numeric-value current-prefix-arg)) (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 gnus-summary-default-score 0)) (setq score (or score gnus-summary-default-score 0))
(gnus-score-set 'mark (list score)) (gnus-score-set 'mark (list score))
(gnus-score-set 'touched '(t)) (gnus-score-set 'touched '(t))
...@@ -979,7 +979,7 @@ EXTRA is the possible non-standard header." ...@@ -979,7 +979,7 @@ EXTRA is the possible non-standard header."
"Automatically expunge articles with score below SCORE." "Automatically expunge articles with score below SCORE."
(interactive (interactive
(list (or (and current-prefix-arg (prefix-numeric-value current-prefix-arg)) (list (or (and current-prefix-arg (prefix-numeric-value current-prefix-arg))
(string-to-int (read-string "Set expunge below: "))))) (string-to-number (read-string "Set expunge below: ")))))
(setq score (or score gnus-summary-default-score 0)) (setq score (or score gnus-summary-default-score 0))
(gnus-score-set 'expunge (list score)) (gnus-score-set 'expunge (list score))
(gnus-score-set 'touched '(t))) (gnus-score-set 'touched '(t)))
......
...@@ -349,9 +349,9 @@ If NOT-ALL, don't pack ticked articles." ...@@ -349,9 +349,9 @@ If NOT-ALL, don't pack ticked articles."
(packer (if (< (string-match "%s" packer) (packer (if (< (string-match "%s" packer)
(string-match "%d" packer)) (string-match "%d" packer))
(format packer files (format packer files
(string-to-int (gnus-soup-unique-prefix dir))) (string-to-number (gnus-soup-unique-prefix dir)))
(format packer (format packer
(string-to-int (gnus-soup-unique-prefix dir)) (string-to-number (gnus-soup-unique-prefix dir))
files))) files)))
(dir (expand-file-name dir))) (dir (expand-file-name dir)))
(gnus-make-directory dir) (gnus-make-directory dir)
...@@ -385,7 +385,7 @@ though the two last may be nil if they are missing." ...@@ -385,7 +385,7 @@ though the two last may be nil if they are missing."
(and (eq (preceding-char) ?\t) (and (eq (preceding-char) ?\t)
(gnus-soup-field)) (gnus-soup-field))
(and (eq (preceding-char) ?\t) (and (eq (preceding-char) ?\t)
(string-to-int (gnus-soup-field)))) (string-to-number (gnus-soup-field))))
areas) areas)
(when (eq (preceding-char) ?\t) (when (eq (preceding-char) ?\t)
(beginning-of-line 2))) (beginning-of-line 2)))
...@@ -535,7 +535,7 @@ Return whether the unpacking was successful." ...@@ -535,7 +535,7 @@ Return whether the unpacking was successful."
(error "Bad header")) (error "Bad header"))
(forward-line 1) (forward-line 1)
(setq beg (point) (setq beg (point)
end (+ (point) (string-to-int end (+ (point) (string-to-number
(buffer-substring (buffer-substring
(match-beginning 1) (match-end 1))))) (match-beginning 1) (match-end 1)))))
(switch-to-buffer tmp-buf) (switch-to-buffer tmp-buf)
......
...@@ -509,7 +509,7 @@ are supported for %s." ...@@ -509,7 +509,7 @@ are supported for %s."
(t (t
(if (null args) (if (null args)
(error 'wrong-number-of-arguments #'my-format n fstring)) (error 'wrong-number-of-arguments #'my-format n fstring))
(let* ((minlen (string-to-int (or (match-string 2) ""))) (let* ((minlen (string-to-number (or (match-string 2) "")))
(arg (car args)) (arg (car args))
(str (if (stringp arg) arg (format "%s" arg))) (str (if (stringp arg) arg (format "%s" arg)))
(lpad (null (match-string 1))) (lpad (null (match-string 1)))
......
...@@ -2517,7 +2517,7 @@ If FORCE is non-nil, the .newsrc file is read." ...@@ -2517,7 +2517,7 @@ If FORCE is non-nil, the .newsrc file is read."
(cond (cond
((looking-at "[0-9]+") ((looking-at "[0-9]+")
;; We narrow and read a number instead of buffer-substring/ ;; We narrow and read a number instead of buffer-substring/
;; string-to-int because it's faster. narrow/widen is ;; string-to-number because it's faster. narrow/widen is
;; faster than save-restriction/narrow, and save-restriction ;; faster than save-restriction/narrow, and save-restriction
;; produces a garbage object. ;; produces a garbage object.
(setq num1 (progn (setq num1 (progn
......
...@@ -5660,7 +5660,7 @@ The resulting hash table is returned, or nil if no Xrefs were found." ...@@ -5660,7 +5660,7 @@ The resulting hash table is returned, or nil if no Xrefs were found."
(match-end 1))) (match-end 1)))
(substring xrefs (match-beginning 1) (match-end 1)))) (substring xrefs (match-beginning 1) (match-end 1))))
(setq number (setq number
(string-to-int (substring xrefs (match-beginning 2) (string-to-number (substring xrefs (match-beginning 2)
(match-end 2)))) (match-end 2))))
(if (setq entry (gnus-gethash group xref-hashtb)) (if (setq entry (gnus-gethash group xref-hashtb))
(setcdr entry (cons number (cdr entry))) (setcdr entry (cons number (cdr entry)))
......
...@@ -1185,7 +1185,7 @@ When called interactively, prompt for REGEXP." ...@@ -1185,7 +1185,7 @@ When called interactively, prompt for REGEXP."
(ignore-errors (ignore-errors
(replace-match (replace-match
(format "%06d" (format "%06d"
(string-to-int (buffer-substring (string-to-number (buffer-substring
(match-beginning 0) (match-end 0))))))) (match-beginning 0) (match-end 0)))))))
(setq string (buffer-substring 1 (point-max))) (setq string (buffer-substring 1 (point-max)))
(setcar (car string-list) string) (setcar (car string-list) string)
......
...@@ -493,7 +493,7 @@ ...@@ -493,7 +493,7 @@
(when (re-search-forward "^X-Gnus-Newsgroup: +\\([^:]+\\):\\([0-9]+\\) " (when (re-search-forward "^X-Gnus-Newsgroup: +\\([^:]+\\):\\([0-9]+\\) "
nil t) nil t)
(cons (buffer-substring (match-beginning 1) (match-end 1)) (cons (buffer-substring (match-beginning 1) (match-end 1))
(string-to-int (string-to-number
(buffer-substring (match-beginning 2) (match-end 2))))))) (buffer-substring (match-beginning 2) (match-end 2)))))))
(defun nnbabyl-insert-lines () (defun nnbabyl-insert-lines ()
......
...@@ -196,7 +196,7 @@ article was posted to nndb") ...@@ -196,7 +196,7 @@ article was posted to nndb")
;; otherwise, pull all of the following numbers into the list ;; otherwise, pull all of the following numbers into the list
(re-search-forward "follows\r?\n?" nil t) (re-search-forward "follows\r?\n?" nil t)
(while (re-search-forward "^[0-9]+$" nil t) (while (re-search-forward "^[0-9]+$" nil t)
(push (string-to-int (match-string 0)) list))) (push (string-to-number (match-string 0)) list)))
list)) list))
(defun nndb-request-expire-articles-remote (defun nndb-request-expire-articles-remote
......
...@@ -601,7 +601,7 @@ all. This may very well take some time.") ...@@ -601,7 +601,7 @@ all. This may very well take some time.")
(nnheader-report 'nndiary "Article %s retrieved" id) (nnheader-report 'nndiary "Article %s retrieved" id)
;; We return the article number. ;; We return the article number.
(cons (if group-num (car group-num) group) (cons (if group-num (car group-num) group)
(string-to-int (file-name-nondirectory path))))))) (string-to-number (file-name-nondirectory path)))))))
(deffoo nndiary-request-group (group &optional server dont-check) (deffoo nndiary-request-group (group &optional server dont-check)
(let ((file-name-coding-system nnmail-pathname-coding-system)) (let ((file-name-coding-system nnmail-pathname-coding-system))
...@@ -820,7 +820,7 @@ all. This may very well take some time.") ...@@ -820,7 +820,7 @@ all. This may very well take some time.")
;; we should insert it. (This situation should never ;; we should insert it. (This situation should never
;; occur, but one likes to make sure...) ;; occur, but one likes to make sure...)
(while (and (looking-at "[0-9]+\t") (while (and (looking-at "[0-9]+\t")
(< (string-to-int (< (string-to-number
(buffer-substring (buffer-substring
(match-beginning 0) (match-end 0))) (match-beginning 0) (match-end 0)))
article) article)
...@@ -1281,14 +1281,14 @@ all. This may very well take some time.") ...@@ -1281,14 +1281,14 @@ all. This may very well take some time.")
(nnheader-article-to-file-alist nndiary-current-directory)))) (nnheader-article-to-file-alist nndiary-current-directory))))
(defun nndiary-string-to-int (str min &optional max) (defun nndiary-string-to-number (str min &optional max)
;; Like `string-to-int' but barf if STR is not exactly an integer, and not ;; Like `string-to-number' but barf if STR is not exactly an integer, and not
;; within the specified bounds. ;; within the specified bounds.
;; Signals are caught by `nndiary-schedule'. ;; Signals are caught by `nndiary-schedule'.
(if (not (string-match "^[ \t]*[0-9]+[ \t]*$" str)) (if (not (string-match "^[ \t]*[0-9]+[ \t]*$" str))
(nndiary-error "not an integer value") (nndiary-error "not an integer value")
;; else ;; else
(let ((val (string-to-int str))) (let ((val (string-to-number str)))
(and (or (< val min) (and (or (< val min)
(and max (> val max))) (and max (> val max)))
(nndiary-error "value out of range")) (nndiary-error "value out of range"))
...@@ -1315,12 +1315,12 @@ all. This may very well take some time.") ...@@ -1315,12 +1315,12 @@ all. This may very well take some time.")
(let ((res (split-string val "-"))) (let ((res (split-string val "-")))
(cond (cond
((= (length res) 1) ((= (length res) 1)
(nndiary-string-to-int (car res) min-or-values max)) (nndiary-string-to-number (car res) min-or-values max))
((= (length res) 2) ((= (length res) 2)
;; don't know if crontab accepts this, but ensure ;; don't know if crontab accepts this, but ensure
;; that BEG is <= END ;; that BEG is <= END
(let ((beg (nndiary-string-to-int (car res) min-or-values max)) (let ((beg (nndiary-string-to-number (car res) min-or-values max))
(end (nndiary-string-to-int (cadr res) min-or-values max))) (end (nndiary-string-to-number (cadr res) min-or-values max)))
(cond ((< beg end) (cond ((< beg end)
(cons beg end)) (cons beg end))
((= beg end) ((= beg end)
......
...@@ -421,7 +421,7 @@ from the document.") ...@@ -421,7 +421,7 @@ from the document.")
(search-forward "\n\n" beg t) (search-forward "\n\n" beg t)
(re-search-backward (re-search-backward
"^Content-Length:[ \t]*\\([0-9]+\\) *$" end t) "^Content-Length:[ \t]*\\([0-9]+\\) *$" end t)
(setq len (string-to-int (match-string 1))) (setq len (string-to-number (match-string 1)))
(search-forward "\n\n" beg t) (search-forward "\n\n" beg t)
(unless (= (setq len (+ (point) len)) (point-max)) (unless (= (setq len (+ (point) len)) (point-max))
(and (< len (point-max)) (and (< len (point-max))
...@@ -444,7 +444,7 @@ from the document.") ...@@ -444,7 +444,7 @@ from the document.")
(defun nndoc-rnews-body-end () (defun nndoc-rnews-body-end ()
(and (re-search-backward nndoc-article-begin nil t) (and (re-search-backward nndoc-article-begin nil t)
(forward-line 1) (forward-line 1)
(goto-char (+ (point) (string-to-int (match-string 1)))))) (goto-char (+ (point) (string-to-number (match-string 1))))))
(defun nndoc-babyl-type-p () (defun nndoc-babyl-type-p ()
(when (re-search-forward "\^_\^L *\n" nil t) (when (re-search-forward "\^_\^L *\n" nil t)
......
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
(file-name-coding-system nnmail-pathname-coding-system) (file-name-coding-system nnmail-pathname-coding-system)
dir file) dir file)
(nnheader-re-read-dir pathname) (nnheader-re-read-dir pathname)
(setq dir (mapcar (lambda (name) (string-to-int (substring name 1))) (setq dir (mapcar (lambda (name) (string-to-number (substring name 1)))
(ignore-errors (directory-files (ignore-errors (directory-files
pathname nil "^#[0-9]+#$" t)))) pathname nil "^#[0-9]+#$" t))))
(dolist (n dir) (dolist (n dir)
...@@ -293,7 +293,7 @@ ...@@ -293,7 +293,7 @@
"Return the list of messages in the group." "Return the list of messages in the group."
(gnus-make-directory nndraft-current-directory) (gnus-make-directory nndraft-current-directory)
(sort (sort
(mapcar 'string-to-int (mapcar 'string-to-number
(directory-files nndraft-current-directory nil "\\`[0-9]+\\'" t)) (directory-files nndraft-current-directory nil "\\`[0-9]+\\'" t))
'<)) '<))
......
...@@ -329,7 +329,7 @@ included.") ...@@ -329,7 +329,7 @@ included.")
(when (re-search-forward "<[a-zA-Z0-9_]@[-a-zA-Z0-9_]>" 1000 t) (when (re-search-forward "<[a-zA-Z0-9_]@[-a-zA-Z0-9_]>" 1000 t)
(concat "From: " (match-string 0) "\n")))) (concat "From: " (match-string 0) "\n"))))
(nneething-from-line (nth 2 atts) file)) (nneething-from-line (nth 2 atts) file))
(if (> (string-to-int (int-to-string (nth 7 atts))) 0) (if (> (string-to-number (int-to-string (nth 7 atts))) 0)
(concat "Chars: " (int-to-string (nth 7 atts)) "\n") (concat "Chars: " (int-to-string (nth 7 atts)) "\n")
"") "")
(if buffer (if buffer
......
...@@ -200,7 +200,7 @@ the group. Then the marks file will be regenerated properly by Gnus.") ...@@ -200,7 +200,7 @@ the group. Then the marks file will be regenerated properly by Gnus.")
((search-backward (concat "\n" nnfolder-article-marker) ((search-backward (concat "\n" nnfolder-article-marker)
nil t) nil t)
(goto-char (match-end 0)) (goto-char (match-end 0))
(setq num (string-to-int (setq num (string-to-number
(buffer-substring (buffer-substring
(point) (gnus-point-at-eol)))) (point) (gnus-point-at-eol))))
(goto-char start) (goto-char start)
...@@ -210,7 +210,7 @@ the group. Then the marks file will be regenerated properly by Gnus.") ...@@ -210,7 +210,7 @@ the group. Then the marks file will be regenerated properly by Gnus.")
(search-forward (concat "\n" nnfolder-article-marker) (search-forward (concat "\n" nnfolder-article-marker)
nil t) nil t)
(progn (progn
(setq num (string-to-int (setq num (string-to-number
(buffer-substring (buffer-substring
(point) (gnus-point-at-eol)))) (point) (gnus-point-at-eol))))
(> num article)) (> num article))
...@@ -285,7 +285,7 @@ the group. Then the marks file will be regenerated properly by Gnus.") ...@@ -285,7 +285,7 @@ the group. Then the marks file will be regenerated properly by Gnus.")
(cons nnfolder-current-group (cons nnfolder-current-group
(if (search-forward (concat "\n" nnfolder-article-marker) (if (search-forward (concat "\n" nnfolder-article-marker)
nil t) nil t)
(string-to-int (buffer-substring (string-to-number (buffer-substring
(point) (gnus-point-at-eol))) (point) (gnus-point-at-eol)))
-1)))))))) -1))))))))
......
...@@ -683,9 +683,9 @@ the line could be found." ...@@ -683,9 +683,9 @@ the line could be found."
(defsubst nnheader-file-to-number (file) (defsubst nnheader-file-to-number (file)
"Take a FILE name and return the article number." "Take a FILE name and return the article number."
(if (string= nnheader-numerical-short-files "^[0-9]+$") (if (string= nnheader-numerical-short-files "^[0-9]+$")
(string-to-int file) (string-to-number file)
(string-match nnheader-numerical-short-files file) (string-match nnheader-numerical-short-files file)
(string-to-int (match-string 0 file)))) (string-to-number (match-string 0 file))))
(defvar nnheader-directory-files-is-safe (defvar nnheader-directory-files-is-safe
(or (eq system-type 'windows-nt) (or (eq system-type 'windows-nt)
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
(error "nnkiboze: No xref")) (error "nnkiboze: No xref"))
(unless (string-match " \\([^ ]+\\):\\([0-9]+\\)" xref) (unless (string-match " \\([^ ]+\\):\\([0-9]+\\)" xref)
(error "nnkiboze: Malformed xref")) (error "nnkiboze: Malformed xref"))
(setq num (string-to-int (match-string 2 xref)) (setq num (string-to-number (match-string 2 xref))
group (match-string 1 xref)) group (match-string 1 xref))
(or (with-current-buffer buffer (or (with-current-buffer buffer
(or (and gnus-use-cache (gnus-cache-request-article num group)) (or (and gnus-use-cache (gnus-cache-request-article num group))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment