From: hmurata Date: Fri, 25 Aug 2006 14:29:16 +0000 (+0000) Subject: (elmo-flatten): Use `append' and `listp' instead of X-Git-Tag: wl-2_15_4~11 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=9041da3cb714676c25dad85e6cd4a80b3755d4c8;p=elisp%2Fwanderlust.git (elmo-flatten): Use `append' and `listp' instead of `nconc' and `consp'. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 873baca..f2e6caf 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2006-08-25 Hiroya Murata + + * elmo-util.el (elmo-flatten): Use `append' and `listp' instead of + `nconc' and `consp'. + 2006-08-23 Hiroya Murata * elmo-map.el (elmo-map-folder-update-locations): Rewrite with diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index 2202faf..85368a0 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -1306,11 +1306,11 @@ SPEC is a list as followed (LABEL MAX-VALUE [FORMAT])." (defun elmo-flatten (list-of-list) "Flatten LIST-OF-LIST." - (if list-of-list - (apply #'nconc - (mapcar (lambda (element) - (if (consp element) element (list element))) - list-of-list)))) + (and list-of-list + (apply #'append + (mapcar (lambda (element) + (if (listp element) element (list element))) + list-of-list)))) (defun elmo-y-or-n-p (prompt &optional auto default) "Same as `y-or-n-p'.