Skip to content

Commit e78c195

Browse files
committed
fix: assoc issue with loaded asds
1 parent f110145 commit e78c195

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

docs/content/Getting-Started/Quick-Start/_index.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ weight: 100
55

66
{{< toc >}}
77

8-
Using Eask as your Emacs package management tool.
8+
Using Qob as your Lisp system management tool.
99

1010
{{< hint info >}}
1111
The installation are cross-platform, using [npm](https://www.npmjs.com/).

lisp/_prepare.lisp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ to actually set up the systems."
462462
(asdf:load-asd file)
463463
(qob-println "Loaded ASD file ~A" file)
464464
(dolist (new-system (qob-newly-loaded-systems pre-systems))
465-
(push (list new-system file) qob-loaded-asds))))
465+
(push (cons new-system file) qob-loaded-asds))))
466466
files)))
467467
(qob-ansi-green "done ✓"))
468468
(setq qob--asds-init-p t)))
@@ -472,12 +472,19 @@ to actually set up the systems."
472472
(qob-init-asds)
473473
(unless qob-loaded-asds
474474
(qob-error "There is no specified ASDF system"))
475-
(asdf:primary-system-name (car (nth 0 qob-loaded-asds))))
475+
(some (lambda (asd)
476+
(asdf:primary-system-name (car asd)))
477+
qob-loaded-asds))
476478

477479
(defun qob-primary-system-entry ()
478480
"Return the primary system."
479481
(let ((name (qob-primary-system-name)))
480-
(assoc name qob-loaded-asds)))
482+
;; NOTE: Not sure why function `assoc' isn't working here;
483+
;; use some and return the value instead.
484+
(some (lambda (asd)
485+
(when (equal (car asd) name)
486+
asd))
487+
qob-loaded-asds)))
481488

482489
(defun qob-primary-system ()
483490
"Return the primary system."
@@ -495,7 +502,7 @@ to actually set up the systems."
495502
(let ((result))
496503
(dolist (system qob-loaded-asds)
497504
(when (equal name (car system))
498-
(setq result (nth 1 system))))
505+
(setq result (cdr system))))
499506
result))
500507

501508
(defun qob-system-files ()

0 commit comments

Comments
 (0)