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
...@@ -769,7 +769,7 @@ If SOURCE is a directory spec, try to return the group name component." ...@@ -769,7 +769,7 @@ If SOURCE is a directory spec, try to return the group name component."
(if (not (save-excursion (if (not (save-excursion
(and (re-search-backward (and (re-search-backward
"^Content-Length:[ \t]*\\([0-9]+\\)" start t) "^Content-Length:[ \t]*\\([0-9]+\\)" start t)
(setq content-length (string-to-int (setq content-length (string-to-number
(buffer-substring (buffer-substring
(match-beginning 1) (match-beginning 1)
(match-end 1)))) (match-end 1))))
...@@ -906,7 +906,7 @@ If SOURCE is a directory spec, try to return the group name component." ...@@ -906,7 +906,7 @@ If SOURCE is a directory spec, try to return the group name component."
(if (not (re-search-forward (if (not (re-search-forward
"^Content-Length:[ \t]*\\([0-9]+\\)" nil t)) "^Content-Length:[ \t]*\\([0-9]+\\)" nil t))
(setq content-length nil) (setq content-length nil)
(setq content-length (string-to-int (match-string 1))) (setq content-length (string-to-number (match-string 1)))
;; We destroy the header, since none of the backends ever ;; We destroy the header, since none of the backends ever
;; use it, and we do not want to confuse other mailers by ;; use it, and we do not want to confuse other mailers by
;; having a (possibly) faulty header. ;; having a (possibly) faulty header.
......
...@@ -475,7 +475,7 @@ ...@@ -475,7 +475,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 nnmbox-in-header-p (pos) (defun nnmbox-in-header-p (pos)
...@@ -681,7 +681,7 @@ ...@@ -681,7 +681,7 @@
(let (alist) (let (alist)
(while (re-search-forward " \\([^:]+\\):\\([0-9]+\\)" end-header t) (while (re-search-forward " \\([^:]+\\):\\([0-9]+\\)" end-header t)
(push (cons (match-string 1) (push (cons (match-string 1)
(string-to-int (match-string 2))) alist)) (string-to-number (match-string 2))) alist))
(nnmbox-insert-newsgroup-line alist)) (nnmbox-insert-newsgroup-line alist))
;; this is really a new article ;; this is really a new article
(nnmbox-save-mail (nnmbox-save-mail
......
...@@ -150,7 +150,7 @@ as unread by Gnus.") ...@@ -150,7 +150,7 @@ as unread by Gnus.")
(file-exists-p file) (file-exists-p file)
(not (file-directory-p file)) (not (file-directory-p file))
(save-excursion (nnmail-find-file file)) (save-excursion (nnmail-find-file file))
(string-to-int (file-name-nondirectory file))))) (string-to-number (file-name-nondirectory file)))))
(deffoo nnmh-request-group (group &optional server dont-check) (deffoo nnmh-request-group (group &optional server dont-check)
(nnheader-init-server-buffer) (nnheader-init-server-buffer)
...@@ -176,7 +176,7 @@ as unread by Gnus.") ...@@ -176,7 +176,7 @@ as unread by Gnus.")
(nnheader-re-read-dir pathname) (nnheader-re-read-dir pathname)
(setq dir (setq dir
(sort (sort
(mapcar (lambda (name) (string-to-int name)) (mapcar (lambda (name) (string-to-number name))
(directory-files pathname nil "^[0-9]+$" t)) (directory-files pathname nil "^[0-9]+$" t))
'<)) '<))
(cond (cond
...@@ -224,7 +224,7 @@ as unread by Gnus.") ...@@ -224,7 +224,7 @@ as unread by Gnus.")
;; For each directory, generate an active file line. ;; For each directory, generate an active file line.
(unless (string= (expand-file-name nnmh-toplev) dir) (unless (string= (expand-file-name nnmh-toplev) dir)
(let ((files (mapcar (let ((files (mapcar
(lambda (name) (string-to-int name)) (lambda (name) (string-to-number name))
(directory-files dir nil "^[0-9]+$" t)))) (directory-files dir nil "^[0-9]+$" t))))
(when files (when files
(save-excursion (save-excursion
...@@ -358,7 +358,7 @@ as unread by Gnus.") ...@@ -358,7 +358,7 @@ as unread by Gnus.")
(nnmh-possibly-change-directory group server) (nnmh-possibly-change-directory group server)
(let ((articles (mapcar (let ((articles (mapcar
(lambda (file) (lambda (file)
(string-to-int file)) (string-to-number file))
(directory-files (directory-files
nnmh-current-directory nil "^[0-9]+$")))) nnmh-current-directory nil "^[0-9]+$"))))
(when articles (when articles
...@@ -486,7 +486,7 @@ as unread by Gnus.") ...@@ -486,7 +486,7 @@ as unread by Gnus.")
(let ((files (sort (let ((files (sort
(mapcar (mapcar
(lambda (f) (lambda (f)
(string-to-int f)) (string-to-number f))
(directory-files dir nil "^[0-9]+$")) (directory-files dir nil "^[0-9]+$"))
'>))) '>)))
(when files (when files
...@@ -509,7 +509,7 @@ as unread by Gnus.") ...@@ -509,7 +509,7 @@ as unread by Gnus.")
;; articles in this folder. The articles that are "new" will be ;; articles in this folder. The articles that are "new" will be
;; marked as unread by Gnus. ;; marked as unread by Gnus.
(let* ((dir nnmh-current-directory) (let* ((dir nnmh-current-directory)
(files (sort (mapcar (function (lambda (name) (string-to-int name))) (files (sort (mapcar (function (lambda (name) (string-to-number name)))
(directory-files nnmh-current-directory (directory-files nnmh-current-directory
nil "^[0-9]+$" t)) nil "^[0-9]+$" t))
'<)) '<))
......
...@@ -212,7 +212,7 @@ marks file will be regenerated properly by Gnus.") ...@@ -212,7 +212,7 @@ marks file will be regenerated properly by Gnus.")
(nnheader-report 'nnml "Article %s retrieved" id) (nnheader-report 'nnml "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 nnml-request-group (group &optional server dont-check) (deffoo nnml-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))
...@@ -426,7 +426,7 @@ marks file will be regenerated properly by Gnus.") ...@@ -426,7 +426,7 @@ marks file will be regenerated properly by Gnus.")
;; 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)
......
...@@ -899,7 +899,7 @@ whether they are `offsite' or `onsite'." ...@@ -899,7 +899,7 @@ whether they are `offsite' or `onsite'."
(selection (selection
(mapcar (lambda (listinfo) (mapcar (lambda (listinfo)
(cons (cdr (assoc "sitename" listinfo)) (cons (cdr (assoc "sitename" listinfo))
(string-to-int (string-to-number
(cdr (assoc "feedid" listinfo))))) (cdr (assoc "feedid" listinfo)))))
feedinfo))) feedinfo)))
(cdr (assoc (cdr (assoc
......
...@@ -752,9 +752,9 @@ backend for the messages.") ...@@ -752,9 +752,9 @@ backend for the messages.")
(let ((files (sort (directory-files nnsoup-directory t "IDX$") (let ((files (sort (directory-files nnsoup-directory t "IDX$")
(lambda (f1 f2) (lambda (f1 f2)
(< (progn (string-match "/\\([0-9]+\\)\\." f1) (< (progn (string-match "/\\([0-9]+\\)\\." f1)
(string-to-int (match-string 1 f1))) (string-to-number (match-string 1 f1)))
(progn (string-match "/\\([0-9]+\\)\\." f2) (progn (string-match "/\\([0-9]+\\)\\." f2)
(string-to-int (match-string 1 f2))))))) (string-to-number (match-string 1 f2)))))))
active group lines ident elem min) active group lines ident elem min)
(set-buffer (get-buffer-create " *nnsoup work*")) (set-buffer (get-buffer-create " *nnsoup work*"))
(while files (while files
......
...@@ -248,7 +248,7 @@ there.") ...@@ -248,7 +248,7 @@ there.")
;; Fix by Sudish Joseph <joseph@cis.ohio-state.edu> ;; Fix by Sudish Joseph <joseph@cis.ohio-state.edu>
(when (setq dir (directory-files pathname nil "^[0-9]+$" t)) (when (setq dir (directory-files pathname nil "^[0-9]+$" t))
(setq dir (setq dir
(sort (mapcar (lambda (name) (string-to-int name)) dir) '<))) (sort (mapcar (lambda (name) (string-to-number name)) dir) '<)))
(if dir (if dir
(nnheader-insert (nnheader-insert
"211 %d %d %d %s\n" (length dir) (car dir) "211 %d %d %d %s\n" (length dir) (car dir)
...@@ -440,7 +440,7 @@ there.") ...@@ -440,7 +440,7 @@ there.")
(goto-char (point-min)) (goto-char (point-min))
(prog1 (prog1
(when (looking-at "<[^>]+>[ \t]+[-0-9~]+[ \t]+\\([^ /\t\n]+\\)/\\([0-9]+\\)[ \t\n]") (when (looking-at "<[^>]+>[ \t]+[-0-9~]+[ \t]+\\([^ /\t\n]+\\)/\\([0-9]+\\)[ \t\n]")
(cons (match-string 1) (string-to-int (match-string 2)))) (cons (match-string 1) (string-to-number (match-string 2))))
(kill-buffer (current-buffer))))) (kill-buffer (current-buffer)))))
(defun nnspool-find-file (file) (defun nnspool-find-file (file)
......
...@@ -1499,7 +1499,7 @@ password contained in '~/.nntp-authinfo'." ...@@ -1499,7 +1499,7 @@ password contained in '~/.nntp-authinfo'."
(when (<= count 1) (when (<= count 1)
(goto-char (point-min)) (goto-char (point-min))
(when (re-search-forward "^[0-9][0-9][0-9] .*\n\\([0-9]+\\)" nil t) (when (re-search-forward "^[0-9][0-9][0-9] .*\n\\([0-9]+\\)" nil t)
(let ((low-limit (string-to-int (let ((low-limit (string-to-number
(buffer-substring (match-beginning 1) (buffer-substring (match-beginning 1)
(match-end 1))))) (match-end 1)))))
(while (and articles (<= (car articles) low-limit)) (while (and articles (<= (car articles) low-limit))
...@@ -1571,7 +1571,7 @@ password contained in '~/.nntp-authinfo'." ...@@ -1571,7 +1571,7 @@ password contained in '~/.nntp-authinfo'."
(goto-char (point-min)) (goto-char (point-min))
;; We first find the number by looking at the status line. ;; We first find the number by looking at the status line.
(let ((number (and (looking-at "2[0-9][0-9] +\\([0-9]+\\) ") (let ((number (and (looking-at "2[0-9][0-9] +\\([0-9]+\\) ")
(string-to-int (string-to-number
(buffer-substring (match-beginning 1) (buffer-substring (match-beginning 1)
(match-end 1))))) (match-end 1)))))
newsgroups xref) newsgroups xref)
...@@ -1609,7 +1609,7 @@ password contained in '~/.nntp-authinfo'." ...@@ -1609,7 +1609,7 @@ password contained in '~/.nntp-authinfo'."
"\\([^ :]+\\):\\([0-9]+\\)") "\\([^ :]+\\):\\([0-9]+\\)")
xref)) xref))
(setq group (match-string 1 xref) (setq group (match-string 1 xref)
number (string-to-int (match-string 2 xref)))) number (string-to-number (match-string 2 xref))))
((and (setq newsgroups ((and (setq newsgroups
(mail-fetch-field "newsgroups")) (mail-fetch-field "newsgroups"))
(not (string-match "," newsgroups))) (not (string-match "," newsgroups)))
......
...@@ -252,7 +252,7 @@ If optional argument SIGN is non-nil, do a combined sign and encrypt." ...@@ -252,7 +252,7 @@ If optional argument SIGN is non-nil, do a combined sign and encrypt."
(when (re-search-forward "^\\[GNUPG:] IMPORT_RES\\>" nil t) (when (re-search-forward "^\\[GNUPG:] IMPORT_RES\\>" nil t)
(setq status (buffer-substring (match-end 0) (setq status (buffer-substring (match-end 0)
(progn (end-of-line)(point))) (progn (end-of-line)(point)))
status (vconcat (mapcar #'string-to-int (split-string status)))) status (vconcat (mapcar #'string-to-number (split-string status))))
(erase-buffer) (erase-buffer)
(insert (format "Imported %d key(s). (insert (format "Imported %d key(s).
\tArmor contains %d key(s) [%d bad, %d old].\n" \tArmor contains %d key(s) [%d bad, %d old].\n"
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
`(mapconcat (lambda (c) (format "%02X" (pgg-char-int c))) `(mapconcat (lambda (c) (format "%02X" (pgg-char-int c)))
,string "") ,string "")
;; `(upcase (apply #'format "%02x%02x%02x%02x%02x%02x%02x%02x" ;; `(upcase (apply #'format "%02x%02x%02x%02x%02x%02x%02x%02x"
;; (string-to-int-list ,string))) ;; (string-to-number-list ,string)))
) )
(defmacro pgg-parse-time-field (bytes) (defmacro pgg-parse-time-field (bytes)
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
(defmacro pgg-read-bytes (nbytes) (defmacro pgg-read-bytes (nbytes)
`(mapcar #'pgg-char-int (pgg-read-bytes-string ,nbytes)) `(mapcar #'pgg-char-int (pgg-read-bytes-string ,nbytes))
;; `(string-to-int-list (pgg-read-bytes-string ,nbytes)) ;; `(string-to-number-list (pgg-read-bytes-string ,nbytes))
) )
(defmacro pgg-read-body-string (ptag) (defmacro pgg-read-body-string (ptag)
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
(defmacro pgg-read-body (ptag) (defmacro pgg-read-body (ptag)
`(mapcar #'pgg-char-int (pgg-read-body-string ,ptag)) `(mapcar #'pgg-char-int (pgg-read-body-string ,ptag))
;; `(string-to-int-list (pgg-read-body-string ,ptag)) ;; `(string-to-number-list (pgg-read-body-string ,ptag))
) )
(defalias 'pgg-skip-bytes 'forward-char) (defalias 'pgg-skip-bytes 'forward-char)
......
...@@ -398,8 +398,8 @@ If NOW, use that time instead." ...@@ -398,8 +398,8 @@ If NOW, use that time instead."
"Return the number of messages in the maildrop and the maildrop's size." "Return the number of messages in the maildrop and the maildrop's size."
(pop3-send-command process "STAT") (pop3-send-command process "STAT")
(let ((response (pop3-read-response process t))) (let ((response (pop3-read-response process t)))
(list (string-to-int (nth 1 (split-string response " "))) (list (string-to-number (nth 1 (split-string response " ")))
(string-to-int (nth 2 (split-string response " ")))) (string-to-number (nth 2 (split-string response " "))))
)) ))
(defun pop3-list (process &optional msg) (defun pop3-list (process &optional msg)
...@@ -449,7 +449,7 @@ This function currently does nothing.") ...@@ -449,7 +449,7 @@ This function currently does nothing.")
"Return highest accessed message-id number for the session." "Return highest accessed message-id number for the session."
(pop3-send-command process "LAST") (pop3-send-command process "LAST")
(let ((response (pop3-read-response process t))) (let ((response (pop3-read-response process t)))
(string-to-int (nth 1 (split-string response " "))) (string-to-number (nth 1 (split-string response " ")))
)) ))
(defun pop3-rset (process) (defun pop3-rset (process)
......
...@@ -69,7 +69,7 @@ them into characters should be done separately." ...@@ -69,7 +69,7 @@ them into characters should be done separately."
(cond ((eq (char-after (1+ (point))) ?\n) (cond ((eq (char-after (1+ (point))) ?\n)
(delete-char 2)) (delete-char 2))
((looking-at "=[0-9A-F][0-9A-F]") ((looking-at "=[0-9A-F][0-9A-F]")
(let ((byte (string-to-int (buffer-substring (1+ (point)) (let ((byte (string-to-number (buffer-substring (1+ (point))
(+ 3 (point))) (+ 3 (point)))
16))) 16)))
(mm-insert-byte byte 1) (mm-insert-byte byte 1)
......
...@@ -183,14 +183,14 @@ symbol `ask', query before flushing the queue file." ...@@ -183,14 +183,14 @@ symbol `ask', query before flushing the queue file."
the external program specified in `mm-url-program' to connect to the external program specified in `mm-url-program' to connect to
server." server."
(with-temp-buffer (with-temp-buffer
(let ((url (concat "http://" host report))) (let ((url (format "http://%s%s" host report)))
(mm-url-insert url t)))) (mm-url-insert url t))))
;;;###autoload ;;;###autoload
(defun spam-report-url-to-file (host report) (defun spam-report-url-to-file (host report)
"Collect spam report requests in `spam-report-requests-file'. "Collect spam report requests in `spam-report-requests-file'.
Customize `spam-report-url-ping-function' to use this function." Customize `spam-report-url-ping-function' to use this function."
(let ((url (concat "http://" host report)) (let ((url (format "http://%s%s" host report))
(file spam-report-requests-file)) (file spam-report-requests-file))
(gnus-make-directory (file-name-directory file)) (gnus-make-directory (file-name-directory file))
(gnus-message 9 "Writing URL `%s' to file `%s'" url file) (gnus-message 9 "Writing URL `%s' to file `%s'" url file)
......
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