Skip to content

Commit bab04c9

Browse files
committed
[wip] undo enrich_ prefix, adapt regex
1 parent 03f50de commit bab04c9

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

cider-util.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,11 @@ Any other value is just returned."
524524
(file-executable-p file)))
525525
file)))
526526

527+
(defconst cider--temp-name-prefix ".cider__")
528+
527529
(defun cider--make-temp-name (file)
528530
(make-temp-name
529-
(concat ".cider__" (file-name-nondirectory file) "__")))
531+
(concat cider--temp-name-prefix (file-name-nondirectory file) "__")))
530532

531533
(defun cider--make-nearby-temp-copy (file)
532534
(let* ((default-directory (or (clojure-project-dir) default-directory))

cider.el

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,14 +412,17 @@ without interfering with classloaders."
412412
:safe #'booleanp)
413413

414414
(defvar cider--enrich-classpath-script-names
415-
'((lein . "enrich_lein.sh")
416-
(clojure-cli . "enrich_clojure.sh")))
415+
'((lein . "lein.sh")
416+
(clojure-cli . "clojure.sh")))
417417

418418
(defun cider--enriched-cmd-p (cmd)
419419
"Test if the shell-quoted CMD contains the name of an enrich-classpath script.
420420
Returns the local path to the script or nil."
421421
(let* ((script-names (map-values cider--enrich-classpath-script-names))
422-
(any-name (rx-to-string `(or ,@script-names)))
422+
(temp-prefix cider--temp-name-prefix)
423+
(any-name (rx-to-string
424+
`(or (: (or ,@script-names) (or eos space))
425+
(: ,temp-prefix (or ,@script-names)))))
423426
(script (thread-last
424427
(split-string-shell-command cmd)
425428
(seq-filter (lambda (part) (string-match any-name part)))
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)