From 350775b472e57c4dbd1b35fd8d827b099c7b0739 Mon Sep 17 00:00:00 2001 From: colin Date: Sun, 24 Nov 2024 09:46:33 -0800 Subject: nits --- src/hypnotisml.lisp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/hypnotisml.lisp b/src/hypnotisml.lisp index 7a71fad..7e29bde 100644 --- a/src/hypnotisml.lisp +++ b/src/hypnotisml.lisp @@ -213,16 +213,14 @@ whose value is NIL will be ignored." :collect k :and :collect v))) (defun @= (elem &rest plist) - "Updates ELEM's ATTRIBUTES slot with PLIST. Any key-value pair in -PLIST whose value is NIL will be ignored. + "Updates ELEM's ATTRIBUTES slot with PLIST. Returns ELEM." (check-type plist keyword-plist) (a:if-let (attribs (elem-attributes elem)) (loop :for (prop val) :on plist :by #'cddr - :when val - :do (setf (getf (attribs-list attribs) prop) val)) + :do (setf (getf (attribs-list attribs) prop) val)) (setf (elem-attributes elem) (make-attribs :list plist))) elem) @@ -242,7 +240,7 @@ already present in the element." (a:if-let (attribs (elem-attributes elem)) (loop :for (prop val) :on plist :by #'cddr - :when (and val (not (getf (attribs-list attribs) prop))) + :unless (getf (attribs-list attribs) prop) :do (setf (getf (attribs-list attribs) prop) val)) (setf (elem-attributes elem) (make-attribs :list plist))) -- cgit v1.2.3