2006-02-10 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+ * elmo-util.el (elmo-flatten): Don't use recursive call.
+
* elmo-search.el (elmo-folder-msgdb-create): Remove an unnecessary
assignment.
(elmo-folder-message-make-temp-files): Use `number-to-string'
(defun elmo-flatten (list-of-list)
"Flatten LIST-OF-LIST."
- (unless (null list-of-list)
- (append (if (and (car list-of-list)
- (listp (car list-of-list)))
- (car list-of-list)
- (list (car list-of-list)))
- (elmo-flatten (cdr list-of-list)))))
+ (if list-of-list
+ (apply #'nconc
+ (mapcar (lambda (element)
+ (if (consp element) element (list element)))
+ list-of-list))))
(defun elmo-y-or-n-p (prompt &optional auto default)
"Same as `y-or-n-p'.