branch: elpa/sesman commit f3975de11a4d64ad0d7533f66ee4892ff0516624 Author: Vitalie Spinu <spinu...@gmail.com> Commit: Vitalie Spinu <spinu...@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.")