branch: master commit a37d4e34ef566df5cfc42c725c3c97252f41ab40 Author: Alex Bennée <alex.ben...@linaro.org> Commit: Oleh Krehel <ohwoeo...@gmail.com>
counsel.el (counsel-compile): fix breakage to subdir recursion Commit 1439e8d broke subdir recursion by only passing the directory containing the subdirs rather than the final subdir. Fix this by partially reverting the change while keeping the new cleaner structure. --- counsel.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/counsel.el b/counsel.el index 7e989ed..2d54e07 100644 --- a/counsel.el +++ b/counsel.el @@ -5233,13 +5233,14 @@ subdirectories that builds may be invoked in." "Return a list of potential build directories." (let* ((srcdir (or dir (counsel--compile-root))) (blddir (counsel--find-build-subdir srcdir)) - (props `(srcdir ,srcdir blddir ,blddir recursive t))) - (mapcar (lambda (s) - (setq s (concat (propertize "Select build in " - 'face 'font-lock-warning-face) - (propertize s 'face 'dired-directory))) - (add-text-properties 0 (length s) props s) - s) + (props `(srcdir ,srcdir recursive t)) + (fmt (concat (propertize "Select build in " + 'face 'font-lock-warning-face) + (propertize "%s" 'face 'dired-directory)))) + (mapcar (lambda (subdir) + (let ((s (format fmt subdir))) + (add-text-properties 0 (length s) `(blddir ,subdir ,@props) s) + s)) (and blddir (counsel--get-build-subdirs blddir))))) ;; No easy way to make directory local, would buffer local make more sense?