diff options
| author | Bozhidar Batsov <bozhidar@batsov.dev> | 2026-02-28 10:09:14 +0200 |
|---|---|---|
| committer | Bozhidar Batsov <bozhidar@batsov.dev> | 2026-02-28 10:22:31 +0200 |
| commit | 62b74483810a21c07866e97d4b385bbd5b422465 (patch) | |
| tree | 5c4e7afec0f852cf6deec5268eb83414d7cd24c1 | |
| parent | b9840f09bea90933accea9252a16d66b1df9d8d4 (diff) | |
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.
| -rw-r--r-- | projectile.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/projectile.el b/projectile.el index a7f7de3..18b9fc7 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. |
