From 6dadca779691ae29c5a2bbfb4f2c2d101ca44911 Mon Sep 17 00:00:00 2001 From: Logan Hunt Date: Sat, 4 Jun 2022 13:09:39 -0700 Subject: Added more CLI options --- config.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config.lisp') diff --git a/config.lisp b/config.lisp index bdb11ca..31f1f58 100644 --- a/config.lisp +++ b/config.lisp @@ -15,7 +15,7 @@ (defun sections (lines &optional (section-list '()) (current-section "") (current-section-list '())) (if (not lines) (cond - ((> (length current-section) 0) + ((nonempty-p current-section) (cons (list current-section current-section-list) section-list)) (t section-list)) (let* ((line (car lines)) @@ -24,7 +24,7 @@ ((= linelen 0) (sections (cdr lines) section-list current-section current-section-list)) ((and (equal #\[ (char line 0)) (equal #\] (char line (1- linelen)))) - (sections (cdr lines) (unless (= (length current-section) 0) + (sections (cdr lines) (unless (not (nonempty-p current-section)) (cons (list current-section current-section-list) section-list)) (subseq line 1 (1- linelen)))) (t -- cgit v1.2.3-70-g09d2