Skip to content

Commit a3e5795

Browse files
committed
fix: split spec
1 parent bab8c48 commit a3e5795

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

lisp/_prepare.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
(require 'url-vars)
2020

2121
(require 'cl-lib)
22+
(require 'ffap)
2223
(require 'files)
2324
(require 'ls-lisp)
2425
(require 'pp)

lisp/core/install-vc.el

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,24 @@
2222

2323
(eask-load "core/install-file")
2424

25+
(defun eask-install-vc--split-sepcs (specs)
26+
"Split the SPECS and return a list of specification."
27+
(let ((new-specs)
28+
(current-spec))
29+
(dolist (spec specs)
30+
;; Detect new specification.
31+
(cond ((ffap-url-p spec)
32+
(push (reverse current-spec) new-specs)
33+
(setq current-spec (list spec (eask-install-file--guess-name spec))))
34+
(t
35+
(push spec current-spec))))
36+
;; Push thes rest of the specification.
37+
(push (reverse current-spec) new-specs)
38+
(cl-remove-if #'null (reverse new-specs))))
39+
2540
(defun eask-install-vc--packages (specs)
2641
"The vc install packages with SPECS."
27-
(let* ((deps (mapcar (lambda (spec)
28-
(list (eask-install-file--guess-name spec) spec))
29-
specs))
42+
(let* ((deps (eask-install-vc--split-sepcs specs))
3043
(names (mapcar #'car deps))
3144
(len (length deps))
3245
(s (eask--sinr len "" "s"))

0 commit comments

Comments
 (0)