aboutsummaryrefslogtreecommitdiff
path: root/src/combinator.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-04-05 10:43:19 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-04-05 11:14:26 -0700
commitd60073bace57dbc13e295f40d39d73092844c08c (patch)
treef57d0b3591d528303e22c8c739de3a3c6d638ee0 /src/combinator.lisp
parent5ffde74ed2e5116e43e8b04c382d17722231512b (diff)
downloadconsfigurator-d60073bace57dbc13e295f40d39d73092844c08c.tar.gz
the empty list is now a valid propapp
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/combinator.lisp')
-rw-r--r--src/combinator.lisp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/combinator.lisp b/src/combinator.lisp
index a67bba8..f782367 100644
--- a/src/combinator.lisp
+++ b/src/combinator.lisp
@@ -20,11 +20,6 @@
;;;; Property combinators
-(defprop noop :posix (&rest args)
- "A property which accepts any number of arguments and does nothing."
- (:desc (declare (ignore args)) "No-op property")
- (:hostattrs (declare (ignore args))))
-
(defmacro define-function-property-combinator (name args &body body)
(multiple-value-bind (forms declarations docstring)
(parse-body body :documentation t)
@@ -107,8 +102,12 @@ apply the elements of REQUIREMENTS in reverse order."
;; should not be returned by property subroutines, per the spec
(defun apply-and-print (propapps &optional unapply)
(flet ((paa (pa) (if unapply (propappunapply pa) (propappapply pa))))
- (let ((ret :no-change))
- (dolist (pa (if unapply (reverse propapps) propapps) ret)
+ (let ((ret :no-change)
+ ;; Remove any null propapps because we don't want to print anything
+ ;; for those, and applying them will do nothing.
+ (propapps
+ (remove-if #'null (if unapply (reverse propapps) propapps))))
+ (dolist (pa propapps ret)
(let* ((announce (not (get (get (car pa) 'combinator)
'inline-combinator)))
;; TODO Nested combinators can mean that we establish this