branch: elpa/helm commit 903f99bffd74f5441db4735eec861cd20f6cf12f Author: Ta Quang Trung <taquangtrun...@gmail.com> Commit: Ta Quang Trung <taquangtrun...@gmail.com>
helm-browse-project: refactor patch to use helm-aif --- helm-files.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/helm-files.el b/helm-files.el index 5e9cecf0b5..807ce98ee9 100644 --- a/helm-files.el +++ b/helm-files.el @@ -7102,14 +7102,14 @@ and helm-type-buffer-actions) helm-type-buffer-actions)) (helm-buffers-in-project-p t) - (git-project (when-let* ((_ (require 'helm-ls-git nil t)) - (_ (fboundp 'helm-ls-git-root-dir)) - (dir (helm-ls-git-root-dir))) - (expand-file-name dir))) - (hg-project (when-let* ((_ (require 'helm-ls-hg nil t)) - (_ (fboundp 'helm-hg-root)) - (dir (helm-hg-root))) - (expand-file-name dir))) + (git-project (helm-aif (and (require 'helm-ls-git nil t) + (fboundp 'helm-ls-git-root-dir) + (helm-ls-git-root-dir)) + (expand-file-name it))) + (hg-project (helm-aif (and (require 'helm-ls-hg nil t) + (fboundp 'helm-hg-root) + (helm-hg-root)) + (expand-file-name it))) (project-type (cond ((and git-project (not hg-project)) 'Git) ((and hg-project (not git-project)) 'Hg) ((and hg-project git-project)