branch: elpa/projectile
commit 62b74483810a21c07866e97d4b385bbd5b422465
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>
Use append instead of nconc in projectile-get-all-sub-projects
nconc destructively modifies the list returned by
projectile-get-immediate-sub-projects, which could affect any caller
holding a reference to that list. Use append for a non-destructive
alternative.
---
projectile.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/projectile.el b/projectile.el
index a7f7de3f6a..18b9fc7a05 100644
--- a/projectile.el
+++ b/projectile.el
@@ -1635,10 +1635,10 @@ PROJECT is base directory to start search recursively."
((null submodules)
nil)
(t
- (nconc submodules (flatten-tree
- ;; recursively get sub-projects of each sub-project
- (mapcar (lambda (s)
- (projectile-get-all-sub-projects s))
submodules)))))))
+ (append submodules (flatten-tree
+ ;; recursively get sub-projects of each sub-project
+ (mapcar (lambda (s)
+ (projectile-get-all-sub-projects s))
submodules)))))))
(defun projectile-get-immediate-sub-projects (path)
"Get immediate sub-projects for a given project without recursing.