mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-02 14:53:38 -05:00
Refactor Project API to reflect changes upstream
projectile-project-root no longer returns `default-directory` if not in a project (it returns nil). As such, doom-project-* functions (and their uses) have been refactored. + doom-project-p & doom-project-root are aliases for projectile-project-p & projectile-project-root. + doom-project-{p,root,name,expand} now has a DIR argument (for consistency, since projectile-project-name and projectile-project-expand do not). + The nocache parameter is no longer necessary, as projectile's caching behavior is now more sane. + Removed some projectile advice/hacks that are no longer necessary. + Updated unit tests
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
(unless (buffer-live-p buffer)
|
||||
(remhash key +eval-repl-buffers)))
|
||||
+eval-repl-buffers)
|
||||
(let* ((project-root (doom-project-root 'nocache))
|
||||
(let* ((project-root (doom-project-root))
|
||||
(key (cons major-mode project-root))
|
||||
(buffer (gethash key +eval-repl-buffers)))
|
||||
(cl-check-type buffer (or buffer null))
|
||||
|
@@ -288,7 +288,7 @@ Otherwise, falls back on `find-file-at-point'."
|
||||
(when (and buffer-file-name (file-equal-p fullpath buffer-file-name))
|
||||
(user-error "Already here"))
|
||||
(let* ((insert-default-directory t)
|
||||
(project-root (doom-project-root 'nocache))
|
||||
(project-root (doom-project-root))
|
||||
(ffap-file-finder
|
||||
(cond ((not (file-directory-p fullpath))
|
||||
#'find-file)
|
||||
|
Reference in New Issue
Block a user