(read-from-string string) with (string-to-number string).
* mh-e.el (mh-parse-flist-output-line, mh-folder-size-folder): Ditto.
* mh-mime.el (mh-mml-forward-message): Ditto.
* mh-search.el (mh-swish-next-result, mh-mairix-next-result)
(mh-namazu-next-result, mh-grep-next-result, mh-md5sum-parser)
(mh-openssl-parser, mh-index-update-maps): Ditto.
* mh-seq.el (mh-translate-range, mh-narrow-to-header-field)
(mh-thread-generate): Ditto.
+2006-01-16 Bill Wohler <wohler@newt.com>
+
+ * mh-comp.el (mh-show-buffer-message-number): Replace (car
+ (read-from-string string) with (string-to-number string).
+
+ * mh-e.el (mh-parse-flist-output-line, mh-folder-size-folder):
+ Ditto.
+
+ * mh-mime.el (mh-mml-forward-message): Ditto.
+
+ * mh-search.el (mh-swish-next-result, mh-mairix-next-result)
+ (mh-namazu-next-result, mh-grep-next-result, mh-md5sum-parser)
+ (mh-openssl-parser, mh-index-update-maps): Ditto.
+
+ * mh-seq.el (mh-translate-range, mh-narrow-to-header-field)
+ (mh-thread-generate): Ditto.
+
2006-01-16 Mark D. Baushke <mdb@gnu.org>
* mh-mime.el (mh-mime-display, mh-mm-inline-message): Fix use of
- mm- functions for proper text=flowed handling. (SF #1273521)
- (Patch contributed by Katsumi Yamaoka <yamaoka@jpl.org>.)
+ mm- functions for proper text=flowed handling (closes SF
+ #1273521). Patch contributed by Katsumi Yamaoka <yamaoka@jpl.org>.
2006-01-15 Bill Wohler <wohler@newt.com>
(set-buffer buffer))
(cond ((eq major-mode 'mh-show-mode)
(let ((number-start (mh-search-from-end ?/ buffer-file-name)))
- (car (read-from-string (substring buffer-file-name
- (1+ number-start))))))
+ (string-to-number (substring buffer-file-name
+ (1+ number-start)))))
((and (eq major-mode 'mh-folder-mode)
mh-show-buffer
(get-buffer mh-show-buffer))
(goto-char (point-max))
(let (folder unseen total p)
(when (search-backward " out of " (point-min) t)
- (setq total (read-from-string
+ (setq total (string-to-number
(buffer-substring-no-properties
(match-end 0) (line-end-position))))
(when (search-backward " in sequence " (point-min) t)
(setq p (point))
(when (search-backward " has " (point-min) t)
- (setq unseen (read-from-string (buffer-substring-no-properties
+ (setq unseen (string-to-number (buffer-substring-no-properties
(match-end 0) p)))
(while (eq (char-after) ? )
(backward-char))
(when (and (equal (aref folder (1- (length folder))) ?+)
(equal current-folder folder))
(setq folder (substring folder 0 (1- (length folder)))))
- (values (format "+%s" folder) (car unseen) (car total))))))))
+ (values (format "+%s" folder) unseen total)))))))
(defun mh-folder-size-folder (folder)
"Find size of FOLDER using \"folder\"."
"-norecurse" folder)
(goto-char (point-min))
(if (re-search-forward " has \\([0-9]+\\) " nil t)
- (values (car (read-from-string (match-string 1))) u folder)
+ (values (string-to-number (match-string 1)) u folder)
(values 0 u folder)))))
(defun mh-folder-size-flist (folder)
MESSAGE number."
(let ((msg (if (and (equal message "") (numberp mh-sent-from-msg))
mh-sent-from-msg
- (car (read-from-string message)))))
+ (string-to-number message))))
(cond ((integerp msg)
(if (string= "" description)
;; Rationale: mml-attach-file constructs a malformed composition
(substring s (match-end 0) (1- (length s))))
(return 'error)))
(let* ((s (buffer-substring-no-properties (1+ (point)) end))
- (val (ignore-errors (read-from-string s))))
- (if (and (consp val) (numberp (car val)))
- (car val)
- (return 'error)))
+ (n (ignore-errors (string-to-number s))))
+ (if n n (return 'error)))
nil)))
(forward-line)))
(return 'error))
(list (format "+%s" (buffer-substring-no-properties
(point) (1- msg-start)))
- (car (read-from-string
- (buffer-substring-no-properties msg-start end)))
+ (string-to-number
+ (buffer-substring-no-properties msg-start end))
nil)))
(forward-line)))
(mark (mh-search-from-end ?/ folder/msg)))
(unless mark (return 'error))
(list (format "+%s" (substring folder/msg 0 mark))
- (let ((n (ignore-errors (read-from-string
+ (let ((n (ignore-errors (string-to-number
(substring folder/msg (1+ mark))))))
- (if (and (consp n) (numberp (car n)))
- (car n)
- (return 'error)))
+ (if n n (return 'error)))
nil))))
(forward-line)))
(return 'error))
(list (format "+%s" (buffer-substring-no-properties
folder-start (point)))
- (let ((val (ignore-errors (read-from-string
- (buffer-substring-no-properties
- (1+ (point)) msg-end)))))
- (if (and (consp val) (integerp (car val)))
- (car val)
- (return 'error)))
+ (let ((n (ignore-errors (string-to-number
+ (buffer-substring-no-properties
+ (1+ (point)) msg-end)))))
+ (if n n (return 'error)))
match))))
(forward-line)))
(goto-char end)
(setq last-slash (search-backward "/" begin t))
(cond ((and first-space last-slash)
- (cons (car (read-from-string (buffer-substring-no-properties
- (1+ last-slash) end)))
+ (cons (string-to-number (buffer-substring-no-properties
+ (1+ last-slash) end))
(buffer-substring-no-properties begin (1- first-space))))
(t (cons nil nil)))))
(setq last-space (search-backward " " begin t))
(setq last-slash (search-backward "/" begin t))
(cond ((and last-slash last-space)
- (cons (car (read-from-string (buffer-substring-no-properties
- (1+ last-slash) (1- last-space))))
+ (cons (string-to-number (buffer-substring-no-properties
+ (1+ last-slash) (1- last-space)))
(buffer-substring-no-properties (1+ last-space) end))))))
(defalias 'mh-md5-parser 'mh-openssl-parser)
;; update maps
(setq checksum (buffer-substring-no-properties
(point) (line-end-position)))
- (let ((msg (car (read-from-string msg))))
+ (let ((msg (string-to-number msg)))
(set-buffer folder)
(mh-index-update-single-msg msg checksum origin-map)))))
(forward-line))))
(set-buffer mh-temp-buffer)
(goto-char (point-min))
(while (re-search-forward "/\\([0-9]*\\)$" nil t)
- (push (car (read-from-string (match-string 1))) result))
+ (push (string-to-number (match-string 1)) result))
(nreverse result)))))
(defun mh-seq-names (seq-list)
(append original (list "-list") pick-expr))
(goto-char (point-min))
(while (not (eobp))
- (let ((num (read-from-string
- (buffer-substring (point) (line-end-position)))))
- (when (numberp (car num)) (push (car num) msg-list))
+ (let ((num (ignore-errors
+ (string-to-number
+ (buffer-substring (point) (line-end-position))))))
+ (when num (push num msg-list))
(forward-line))))
(if (null msg-list)
(message "No matches")
(let* ((index-line
(prog1 (buffer-substring (point) (line-end-position))
(forward-line)))
- (index (car (read-from-string index-line)))
+ (index (string-to-number index-line))
(id (prog1 (buffer-substring (point) (line-end-position))
(forward-line)))
(refs (prog1 (buffer-substring (point) (line-end-position))