Skip to content

Commit

Permalink
Merge aca92ec into 14d4c6a
Browse files Browse the repository at this point in the history
  • Loading branch information
jobor committed Feb 1, 2023
2 parents 14d4c6a + aca92ec commit 8b27e95
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions rg.el
Original file line number Diff line number Diff line change
Expand Up @@ -387,11 +387,13 @@ DEFAULT is the default pattern to use at the prompt."
(fboundp 'ffip-project-root))
(ffip-project-root))
(when (and (require 'project nil t)
(fboundp 'project-current)
(fboundp 'project-roots))
(let ((project (project-current)))
(when project
(car (project-roots project)))))
(fboundp 'project-current))
(if-let ((project (project-current)))
(cond
((fboundp 'project-root)
(project-root project))
((fboundp 'project-roots)
(car (project-roots project))))))
(let ((file (expand-file-name (or file default-directory))))
(condition-case nil
(vc-call-backend (vc-responsible-backend file) 'root file)
Expand Down

0 comments on commit 8b27e95

Please sign in to comment.