From 62b74483810a21c07866e97d4b385bbd5b422465 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sat, 28 Feb 2026 10:09:14 +0200 Subject: 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 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. -- cgit v1.0