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

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

[nongnu] elpa/inf-clojure f298612 259/313: [Fix #173] Use clojure-mode p


From: ELPA Syncer
Subject: [nongnu] elpa/inf-clojure f298612 259/313: [Fix #173] Use clojure-mode project detection (#176)
Date: Wed, 11 Aug 2021 10:00:29 -0400 (EDT)

branch: elpa/inf-clojure
commit f29861204ddbb032b425c7d693e8c006b7b027c6
Author: dpsutton <dan@dpsutton.com>
Commit: GitHub <noreply@github.com>

    [Fix #173] Use clojure-mode project detection (#176)
    
    We also get as an extra benefit project type caching and all of the project
    types supported by clojure-mode.
---
 CHANGELOG.md   |  1 +
 inf-clojure.el | 19 ++-----------------
 2 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index decc2f5..0c85fa4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@
 
 ### New features
 
+* [#173](https://github.com/clojure-emacs/inf-clojure/issues/173): Use 
clojure-mode project detection instead of duplicate version in inf-clojure
 * [#174](https://github.com/clojure-emacs/inf-clojure/pull/174): Set REPL type 
from startup form or prompt at startup, introduce 
`inf-clojure-custom-repl-type` defcustom.
 * [#174](https://github.com/clojure-emacs/inf-clojure/pull/174): Invoke 
`inf-clojure` with a prefix argument to prevent using 
`inf-clojure-custom-startup` and `inf-clojure-custom-repl-type.
 
diff --git a/inf-clojure.el b/inf-clojure.el
index fed299b..a78774a 100644
--- a/inf-clojure.el
+++ b/inf-clojure.el
@@ -595,21 +595,6 @@ to continue it."
     (inf-clojure-chomp (concat "\n" (inf-clojure-remove-subprompts str))))
    (t str)))
 
-(defvar inf-clojure-project-root-files
-  '("project.clj" "build.boot" "deps.edn" "shadow-cljs.edn")
-  "A list of files that can be considered project markers.")
-
-(defun inf-clojure-project-root ()
-  "Retrieve the root directory of a project if available.
-
-Fallback to `default-directory.' if not within a project."
-  (or (car (remove nil
-                   (mapcar (lambda
-                             (file)
-                             (locate-dominating-file default-directory file))
-                           inf-clojure-project-root-files)))
-      default-directory))
-
 (defun inf-clojure-clear-repl-buffer ()
   "Clear the REPL buffer."
   (interactive)
@@ -682,7 +667,7 @@ process buffer for a list of commands.)"
                                           'confirm-after-completion))))
   (if (not (comint-check-proc "*inf-clojure*"))
       ;; run the new process in the project's root when in a project folder
-      (let ((default-directory (inf-clojure-project-root))
+      (let ((default-directory (clojure-project-dir))
             (cmdlist (if (consp cmd)
                          (list cmd)
                        (split-string cmd)))
@@ -957,7 +942,7 @@ STRING if present."
                             (prin1-to-string (substring-no-properties 
string))))
                   nil
                   (expand-file-name inf-clojure--log-file-name
-                                    (inf-clojure-project-root))
+                                    (clojure-project-dir))
                   'append
                   'no-annoying-write-file-in-minibuffer)))
 



reply via email to

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