aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wohler2006-01-16 20:05:14 +0000
committerBill Wohler2006-01-16 20:05:14 +0000
commit8d2aa2377562f6c8f77e4cfe65a1fb8f1ac78cb6 (patch)
tree0213d2740d10426ef55e078abe495daa630e897c
parent9ac2e4e5236f040aa935860d5816da809bbd19e9 (diff)
downloademacs-8d2aa2377562f6c8f77e4cfe65a1fb8f1ac78cb6.tar.gz
emacs-8d2aa2377562f6c8f77e4cfe65a1fb8f1ac78cb6.zip
* 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.
-rw-r--r--lisp/mh-e/ChangeLog21
-rw-r--r--lisp/mh-e/mh-comp.el4
-rw-r--r--lisp/mh-e/mh-e.el8
-rw-r--r--lisp/mh-e/mh-mime.el2
-rw-r--r--lisp/mh-e/mh-search.el36
-rw-r--r--lisp/mh-e/mh-seq.el11
6 files changed, 47 insertions, 35 deletions
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index 8ecaf76b5ae..d31d3eebf99 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -1,8 +1,25 @@
12006-01-16 Bill Wohler <wohler@newt.com>
2
3 * mh-comp.el (mh-show-buffer-message-number): Replace (car
4 (read-from-string string) with (string-to-number string).
5
6 * mh-e.el (mh-parse-flist-output-line, mh-folder-size-folder):
7 Ditto.
8
9 * mh-mime.el (mh-mml-forward-message): Ditto.
10
11 * mh-search.el (mh-swish-next-result, mh-mairix-next-result)
12 (mh-namazu-next-result, mh-grep-next-result, mh-md5sum-parser)
13 (mh-openssl-parser, mh-index-update-maps): Ditto.
14
15 * mh-seq.el (mh-translate-range, mh-narrow-to-header-field)
16 (mh-thread-generate): Ditto.
17
12006-01-16 Mark D. Baushke <mdb@gnu.org> 182006-01-16 Mark D. Baushke <mdb@gnu.org>
2 19
3 * mh-mime.el (mh-mime-display, mh-mm-inline-message): Fix use of 20 * mh-mime.el (mh-mime-display, mh-mm-inline-message): Fix use of
4 mm- functions for proper text=flowed handling. (SF #1273521) 21 mm- functions for proper text=flowed handling (closes SF
5 (Patch contributed by Katsumi Yamaoka <yamaoka@jpl.org>.) 22 #1273521). Patch contributed by Katsumi Yamaoka <yamaoka@jpl.org>.
6 23
72006-01-15 Bill Wohler <wohler@newt.com> 242006-01-15 Bill Wohler <wohler@newt.com>
8 25
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el
index 07f4bc60dc7..984af4e461d 100644
--- a/lisp/mh-e/mh-comp.el
+++ b/lisp/mh-e/mh-comp.el
@@ -522,8 +522,8 @@ Optional argument BUFFER can be used to specify the buffer."
522 (set-buffer buffer)) 522 (set-buffer buffer))
523 (cond ((eq major-mode 'mh-show-mode) 523 (cond ((eq major-mode 'mh-show-mode)
524 (let ((number-start (mh-search-from-end ?/ buffer-file-name))) 524 (let ((number-start (mh-search-from-end ?/ buffer-file-name)))
525 (car (read-from-string (substring buffer-file-name 525 (string-to-number (substring buffer-file-name
526 (1+ number-start)))))) 526 (1+ number-start)))))
527 ((and (eq major-mode 'mh-folder-mode) 527 ((and (eq major-mode 'mh-folder-mode)
528 mh-show-buffer 528 mh-show-buffer
529 (get-buffer mh-show-buffer)) 529 (get-buffer mh-show-buffer))
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index c173b0c75dc..f92d777309a 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -1372,13 +1372,13 @@ folders whose names end with a '+' character."
1372 (goto-char (point-max)) 1372 (goto-char (point-max))
1373 (let (folder unseen total p) 1373 (let (folder unseen total p)
1374 (when (search-backward " out of " (point-min) t) 1374 (when (search-backward " out of " (point-min) t)
1375 (setq total (read-from-string 1375 (setq total (string-to-number
1376 (buffer-substring-no-properties 1376 (buffer-substring-no-properties
1377 (match-end 0) (line-end-position)))) 1377 (match-end 0) (line-end-position))))
1378 (when (search-backward " in sequence " (point-min) t) 1378 (when (search-backward " in sequence " (point-min) t)
1379 (setq p (point)) 1379 (setq p (point))
1380 (when (search-backward " has " (point-min) t) 1380 (when (search-backward " has " (point-min) t)
1381 (setq unseen (read-from-string (buffer-substring-no-properties 1381 (setq unseen (string-to-number (buffer-substring-no-properties
1382 (match-end 0) p))) 1382 (match-end 0) p)))
1383 (while (eq (char-after) ? ) 1383 (while (eq (char-after) ? )
1384 (backward-char)) 1384 (backward-char))
@@ -1387,7 +1387,7 @@ folders whose names end with a '+' character."
1387 (when (and (equal (aref folder (1- (length folder))) ?+) 1387 (when (and (equal (aref folder (1- (length folder))) ?+)
1388 (equal current-folder folder)) 1388 (equal current-folder folder))
1389 (setq folder (substring folder 0 (1- (length folder))))) 1389 (setq folder (substring folder 0 (1- (length folder)))))
1390 (values (format "+%s" folder) (car unseen) (car total)))))))) 1390 (values (format "+%s" folder) unseen total)))))))
1391 1391
1392(defun mh-folder-size-folder (folder) 1392(defun mh-folder-size-folder (folder)
1393 "Find size of FOLDER using \"folder\"." 1393 "Find size of FOLDER using \"folder\"."
@@ -1398,7 +1398,7 @@ folders whose names end with a '+' character."
1398 "-norecurse" folder) 1398 "-norecurse" folder)
1399 (goto-char (point-min)) 1399 (goto-char (point-min))
1400 (if (re-search-forward " has \\([0-9]+\\) " nil t) 1400 (if (re-search-forward " has \\([0-9]+\\) " nil t)
1401 (values (car (read-from-string (match-string 1))) u folder) 1401 (values (string-to-number (match-string 1)) u folder)
1402 (values 0 u folder))))) 1402 (values 0 u folder)))))
1403 1403
1404(defun mh-folder-size-flist (folder) 1404(defun mh-folder-size-flist (folder)
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el
index f2eadd878b0..a91d7b1212a 100644
--- a/lisp/mh-e/mh-mime.el
+++ b/lisp/mh-e/mh-mime.el
@@ -543,7 +543,7 @@ The function will prompt the user for a DESCRIPTION, a FOLDER and
543MESSAGE number." 543MESSAGE number."
544 (let ((msg (if (and (equal message "") (numberp mh-sent-from-msg)) 544 (let ((msg (if (and (equal message "") (numberp mh-sent-from-msg))
545 mh-sent-from-msg 545 mh-sent-from-msg
546 (car (read-from-string message))))) 546 (string-to-number message))))
547 (cond ((integerp msg) 547 (cond ((integerp msg)
548 (if (string= "" description) 548 (if (string= "" description)
549 ;; Rationale: mml-attach-file constructs a malformed composition 549 ;; Rationale: mml-attach-file constructs a malformed composition
diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el
index 55cbd02dd97..55e6d7b076f 100644
--- a/lisp/mh-e/mh-search.el
+++ b/lisp/mh-e/mh-search.el
@@ -1105,10 +1105,8 @@ is used to search."
1105 (substring s (match-end 0) (1- (length s)))) 1105 (substring s (match-end 0) (1- (length s))))
1106 (return 'error))) 1106 (return 'error)))
1107 (let* ((s (buffer-substring-no-properties (1+ (point)) end)) 1107 (let* ((s (buffer-substring-no-properties (1+ (point)) end))
1108 (val (ignore-errors (read-from-string s)))) 1108 (n (ignore-errors (string-to-number s))))
1109 (if (and (consp val) (numberp (car val))) 1109 (if n n (return 'error)))
1110 (car val)
1111 (return 'error)))
1112 nil))) 1110 nil)))
1113 (forward-line))) 1111 (forward-line)))
1114 1112
@@ -1184,8 +1182,8 @@ SEARCH-REGEXP-LIST is used to search."
1184 (return 'error)) 1182 (return 'error))
1185 (list (format "+%s" (buffer-substring-no-properties 1183 (list (format "+%s" (buffer-substring-no-properties
1186 (point) (1- msg-start))) 1184 (point) (1- msg-start)))
1187 (car (read-from-string 1185 (string-to-number
1188 (buffer-substring-no-properties msg-start end))) 1186 (buffer-substring-no-properties msg-start end))
1189 nil))) 1187 nil)))
1190 (forward-line))) 1188 (forward-line)))
1191 1189
@@ -1313,11 +1311,9 @@ is used to search."
1313 (mark (mh-search-from-end ?/ folder/msg))) 1311 (mark (mh-search-from-end ?/ folder/msg)))
1314 (unless mark (return 'error)) 1312 (unless mark (return 'error))
1315 (list (format "+%s" (substring folder/msg 0 mark)) 1313 (list (format "+%s" (substring folder/msg 0 mark))
1316 (let ((n (ignore-errors (read-from-string 1314 (let ((n (ignore-errors (string-to-number
1317 (substring folder/msg (1+ mark)))))) 1315 (substring folder/msg (1+ mark))))))
1318 (if (and (consp n) (numberp (car n))) 1316 (if n n (return 'error)))
1319 (car n)
1320 (return 'error)))
1321 nil)))) 1317 nil))))
1322 (forward-line))) 1318 (forward-line)))
1323 1319
@@ -1458,12 +1454,10 @@ record is invalid return 'error."
1458 (return 'error)) 1454 (return 'error))
1459 (list (format "+%s" (buffer-substring-no-properties 1455 (list (format "+%s" (buffer-substring-no-properties
1460 folder-start (point))) 1456 folder-start (point)))
1461 (let ((val (ignore-errors (read-from-string 1457 (let ((n (ignore-errors (string-to-number
1462 (buffer-substring-no-properties 1458 (buffer-substring-no-properties
1463 (1+ (point)) msg-end))))) 1459 (1+ (point)) msg-end)))))
1464 (if (and (consp val) (integerp (car val))) 1460 (if n n (return 'error)))
1465 (car val)
1466 (return 'error)))
1467 match)))) 1461 match))))
1468 (forward-line))) 1462 (forward-line)))
1469 1463
@@ -1804,8 +1798,8 @@ PROC is used to convert the value to actual data."
1804 (goto-char end) 1798 (goto-char end)
1805 (setq last-slash (search-backward "/" begin t)) 1799 (setq last-slash (search-backward "/" begin t))
1806 (cond ((and first-space last-slash) 1800 (cond ((and first-space last-slash)
1807 (cons (car (read-from-string (buffer-substring-no-properties 1801 (cons (string-to-number (buffer-substring-no-properties
1808 (1+ last-slash) end))) 1802 (1+ last-slash) end))
1809 (buffer-substring-no-properties begin (1- first-space)))) 1803 (buffer-substring-no-properties begin (1- first-space))))
1810 (t (cons nil nil))))) 1804 (t (cons nil nil)))))
1811 1805
@@ -1818,8 +1812,8 @@ PROC is used to convert the value to actual data."
1818 (setq last-space (search-backward " " begin t)) 1812 (setq last-space (search-backward " " begin t))
1819 (setq last-slash (search-backward "/" begin t)) 1813 (setq last-slash (search-backward "/" begin t))
1820 (cond ((and last-slash last-space) 1814 (cond ((and last-slash last-space)
1821 (cons (car (read-from-string (buffer-substring-no-properties 1815 (cons (string-to-number (buffer-substring-no-properties
1822 (1+ last-slash) (1- last-space)))) 1816 (1+ last-slash) (1- last-space)))
1823 (buffer-substring-no-properties (1+ last-space) end)))))) 1817 (buffer-substring-no-properties (1+ last-space) end))))))
1824 1818
1825(defalias 'mh-md5-parser 'mh-openssl-parser) 1819(defalias 'mh-md5-parser 'mh-openssl-parser)
@@ -1858,7 +1852,7 @@ origin-index) map is updated too."
1858 ;; update maps 1852 ;; update maps
1859 (setq checksum (buffer-substring-no-properties 1853 (setq checksum (buffer-substring-no-properties
1860 (point) (line-end-position))) 1854 (point) (line-end-position)))
1861 (let ((msg (car (read-from-string msg)))) 1855 (let ((msg (string-to-number msg)))
1862 (set-buffer folder) 1856 (set-buffer folder)
1863 (mh-index-update-single-msg msg checksum origin-map))))) 1857 (mh-index-update-single-msg msg checksum origin-map)))))
1864 (forward-line)))) 1858 (forward-line))))
diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el
index 4f2f7de5916..842289ae635 100644
--- a/lisp/mh-e/mh-seq.el
+++ b/lisp/mh-e/mh-seq.el
@@ -560,7 +560,7 @@ should be replaced with:
560 (set-buffer mh-temp-buffer) 560 (set-buffer mh-temp-buffer)
561 (goto-char (point-min)) 561 (goto-char (point-min))
562 (while (re-search-forward "/\\([0-9]*\\)$" nil t) 562 (while (re-search-forward "/\\([0-9]*\\)$" nil t)
563 (push (car (read-from-string (match-string 1))) result)) 563 (push (string-to-number (match-string 1)) result))
564 (nreverse result))))) 564 (nreverse result)))))
565 565
566(defun mh-seq-names (seq-list) 566(defun mh-seq-names (seq-list)
@@ -928,9 +928,10 @@ The MH command pick is used to do the match."
928 (append original (list "-list") pick-expr)) 928 (append original (list "-list") pick-expr))
929 (goto-char (point-min)) 929 (goto-char (point-min))
930 (while (not (eobp)) 930 (while (not (eobp))
931 (let ((num (read-from-string 931 (let ((num (ignore-errors
932 (buffer-substring (point) (line-end-position))))) 932 (string-to-number
933 (when (numberp (car num)) (push (car num) msg-list)) 933 (buffer-substring (point) (line-end-position))))))
934 (when num (push num msg-list))
934 (forward-line)))) 935 (forward-line))))
935 (if (null msg-list) 936 (if (null msg-list)
936 (message "No matches") 937 (message "No matches")
@@ -1350,7 +1351,7 @@ Only information about messages in MSG-LIST are added to the tree."
1350 (let* ((index-line 1351 (let* ((index-line
1351 (prog1 (buffer-substring (point) (line-end-position)) 1352 (prog1 (buffer-substring (point) (line-end-position))
1352 (forward-line))) 1353 (forward-line)))
1353 (index (car (read-from-string index-line))) 1354 (index (string-to-number index-line))
1354 (id (prog1 (buffer-substring (point) (line-end-position)) 1355 (id (prog1 (buffer-substring (point) (line-end-position))
1355 (forward-line))) 1356 (forward-line)))
1356 (refs (prog1 (buffer-substring (point) (line-end-position)) 1357 (refs (prog1 (buffer-substring (point) (line-end-position))