Skip to content

Commit 2b6cdc7

Browse files
Use project-root instead of cdr; closes #752
1 parent 7f2813d commit 2b6cdc7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

racket-util.el

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
;;; racket-util.el -*- lexical-binding: t -*-
22

3-
;; Copyright (c) 2013-2022 by Greg Hendershott.
3+
;; Copyright (c) 2013-2022, 2025 by Greg Hendershott.
44
;; Portions Copyright (C) 1985-1986, 1999-2013 Free Software Foundation, Inc.
55

66
;; Author: Greg Hendershott
@@ -117,8 +117,11 @@ The \"project\" is determined by trying, in order:
117117
(projectile-project-root dir))
118118
(and (fboundp 'vc-root-dir)
119119
(vc-root-dir))
120-
(and (fboundp 'project-current)
121-
(cdr (project-current nil dir)))
120+
(and (require 'project nil 'noerror)
121+
(fboundp 'project-current)
122+
(fboundp 'project-root)
123+
(when-let (pr (project-current nil dir))
124+
(project-root pr)))
122125
dir)))
123126

124127
(defun racket--edit-mode-p ()

0 commit comments

Comments
 (0)