fix(tazjin/emacs): don't crash in find-cargo-project
Change-Id: I8a94892a527958946c975047204000eaf15395f2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8946 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
20acf3ecfd
commit
d73e8fb041
1 changed files with 5 additions and 4 deletions
|
@ -301,10 +301,11 @@ the GPG agent correctly."
|
|||
(defun find-cargo-project (dir)
|
||||
"Attempt to find the current project in `project-find-functions'
|
||||
by looking for a `Cargo.toml' file."
|
||||
(when dir
|
||||
(unless (equal "/" dir)
|
||||
(if (f-exists-p (f-join dir "Cargo.toml"))
|
||||
(cons 'transient dir)
|
||||
(find-cargo-project (f-parent dir)))))
|
||||
(find-cargo-project (f-parent dir))))))
|
||||
|
||||
(add-to-list 'project-find-functions #'find-cargo-project)
|
||||
|
||||
|
|
Loading…
Reference in a new issue