Mercurial > emacs
comparison lisp/eshell/esh-util.el @ 65164:4cc6dbdfa5af
(eshell-flatten-list): Don't call eshell-flatten-list on a
sub-argument if it is eq to nil.
author | John Wiegley <johnw@newartisans.com> |
---|---|
date | Fri, 26 Aug 2005 22:35:57 +0000 |
parents | 34bd8e434dd7 |
children | b93526432c17 |
comparison
equal
deleted
inserted
replaced
65163:ef138cf4be94 | 65164:4cc6dbdfa5af |
---|---|
292 | 292 |
293 (defun eshell-flatten-list (args) | 293 (defun eshell-flatten-list (args) |
294 "Flatten any lists within ARGS, so that there are no sublists." | 294 "Flatten any lists within ARGS, so that there are no sublists." |
295 (let ((new-list (list t))) | 295 (let ((new-list (list t))) |
296 (eshell-for a args | 296 (eshell-for a args |
297 (if (and (listp a) | 297 (if (and (not (eq a nil)) |
298 (listp a) | |
298 (listp (cdr a))) | 299 (listp (cdr a))) |
299 (nconc new-list (eshell-flatten-list a)) | 300 (nconc new-list (eshell-flatten-list a)) |
300 (nconc new-list (list a)))) | 301 (nconc new-list (list a)))) |
301 (cdr new-list))) | 302 (cdr new-list))) |
302 | 303 |