emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/sesman f3975de11a 038/100: Remove dependency on project.el


From: ELPA Syncer
Subject: [nongnu] elpa/sesman f3975de11a 038/100: Remove dependency on project.el
Date: Tue, 28 Dec 2021 14:06:00 -0500 (EST)

branch: elpa/sesman
commit f3975de11a4d64ad0d7533f66ee4892ff0516624
Author: Vitalie Spinu <spinuvit@gmail.com>
Commit: Vitalie Spinu <spinuvit@gmail.com>

    Remove dependency on project.el
---
 sesman.el | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/sesman.el b/sesman.el
index 27707d60b1..fbc37a558b 100644
--- a/sesman.el
+++ b/sesman.el
@@ -725,8 +725,6 @@ buffers."
 
 
 ;;; Contexts
-(require 'project)
-
 (cl-defgeneric sesman-context (_cxt-type)
   "Given context type CXT-TYPE return the context.")
 (cl-defmethod sesman-context ((_cxt-type (eql buffer)))
@@ -739,10 +737,11 @@ buffers."
   "Return current project."
   (or
    (sesman-project (sesman--system))
-   (progn
-     (let ((proj (project-current)))
-       (when proj
-         (car (project-roots proj)))))))
+   ;; Normally we would use (project-roots (project-current)) but currently
+   ;; project-roots fails on nil and doesn't work on custom `('foo .
+   ;; "path/to/project"). So, use vc as a fallback and don't use project.el at
+   ;; all for now.
+   (vc-root-dir)))
 
 (cl-defgeneric sesman-relevant-context-p (_cxt-type cxt)
   "Non-nil if context CXT is relevant to current context of type CXT-TYPE.")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]