mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -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:
@ -7,7 +7,7 @@ non-nil, cd into the current project's root."
|
||||
(interactive "P")
|
||||
(let ((default-directory
|
||||
(if arg
|
||||
(doom-project-root 'nocache)
|
||||
(or (doom-project-root) default-directory)
|
||||
default-directory)))
|
||||
;; Doom's switch-buffer hooks prevent themselves from triggering when
|
||||
;; switching from buffer A back to A. Because `multi-term' uses `set-buffer'
|
||||
@ -22,7 +22,7 @@ non-nil, cd into the current project's root."
|
||||
(interactive "P")
|
||||
(let ((default-directory
|
||||
(if arg
|
||||
(doom-project-root 'nocache)
|
||||
(or (doom-project-root) default-directory)
|
||||
default-directory)))
|
||||
(pop-to-buffer (save-window-excursion (multi-term)))))
|
||||
|
||||
|
Reference in New Issue
Block a user