summaryrefslogtreecommitdiff
path: root/lisp/mh-e
diff options
context:
space:
mode:
authorBill Wohler <wohler@newt.com>2006-03-16 17:01:12 +0000
committerBill Wohler <wohler@newt.com>2006-03-16 17:01:12 +0000
commit8d1ada5345b7192b2ee3cb7286b1f54738a70d8a (patch)
treedd06f0c8f5f2538750903253240d754c6ff3345d /lisp/mh-e
parente8b5a7cebf76fb97b7da34d63837bcd2c55d310a (diff)
downloademacs-8d1ada5345b7192b2ee3cb7286b1f54738a70d8a.tar.gz
(mh-list-to-string-1): Use dolist.
Diffstat (limited to 'lisp/mh-e')
-rw-r--r--lisp/mh-e/ChangeLog2
-rw-r--r--lisp/mh-e/mh-e.el28
2 files changed, 16 insertions, 14 deletions
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index f9c392724ae..6bec45ec143 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -1,5 +1,7 @@
2006-03-16 Bill Wohler <wohler@newt.com>
+ * mh-e.el (mh-list-to-string-1): Use dolist.
+
* mh-compat.el (mh-image-load-path-for-library): Prefer user's
images.
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index 0b8961470a7..84e569bab81 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -427,20 +427,20 @@ gnus-version)
(defun mh-list-to-string-1 (l)
"Flatten the list L and make every element of the new list into a string."
- (let ((new-list nil))
- (while l
- (cond ((null (car l)))
- ((symbolp (car l))
- (setq new-list (cons (symbol-name (car l)) new-list)))
- ((numberp (car l))
- (setq new-list (cons (int-to-string (car l)) new-list)))
- ((equal (car l) ""))
- ((stringp (car l)) (setq new-list (cons (car l) new-list)))
- ((listp (car l))
- (setq new-list (nconc (mh-list-to-string-1 (car l))
- new-list)))
- (t (error "Bad element in `mh-list-to-string': %s" (car l))))
- (setq l (cdr l)))
+ (let (new-list)
+ (dolist (element l)
+ (cond ((null element))
+ ((symbolp element)
+ (push (symbol-name element) new-list))
+ ((numberp element)
+ (push (int-to-string element) new-list))
+ ((equal element ""))
+ ((stringp element)
+ (push element new-list))
+ ((listp element)
+ (setq new-list (nconc (mh-list-to-string-1 element) new-list)))
+ (t
+ (error "Bad element: %s" element))))
new-list))