Mercurial > emacs
diff lisp/mh-e/mh-e.el @ 69519:e9f5e5650ade
(mh-list-to-string-1): Use dolist.
author | Bill Wohler <wohler@newt.com> |
---|---|
date | Thu, 16 Mar 2006 17:01:12 +0000 |
parents | 6afc0d1f682b |
children | 2c0452875544 e3bacb89536a |
line wrap: on
line diff
--- a/lisp/mh-e/mh-e.el Thu Mar 16 17:00:02 2006 +0000 +++ b/lisp/mh-e/mh-e.el Thu Mar 16 17:01:12 2006 +0000 @@ -427,20 +427,20 @@ (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))