diff lisp/mh-e/mh-search.el @ 68212:0c77c0b9a620

* 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.
author Bill Wohler <wohler@newt.com>
date Mon, 16 Jan 2006 20:05:14 +0000
parents 5012e59a73c7
children 37d03b3298bf
line wrap: on
line diff
--- a/lisp/mh-e/mh-search.el	Mon Jan 16 19:42:53 2006 +0000
+++ b/lisp/mh-e/mh-search.el	Mon Jan 16 20:05:14 2006 +0000
@@ -1105,10 +1105,8 @@
                               (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)))
 
@@ -1184,8 +1182,8 @@
             (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)))
 
@@ -1313,11 +1311,9 @@
                  (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)))
 
@@ -1458,12 +1454,10 @@
               (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)))
 
@@ -1804,8 +1798,8 @@
     (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)))))
 
@@ -1818,8 +1812,8 @@
     (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)
@@ -1858,7 +1852,7 @@
                    ;; 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))))