diff options
author | colin <colin@cicadas.surf> | 2024-11-24 09:46:33 -0800 |
---|---|---|
committer | colin <colin@cicadas.surf> | 2024-11-24 09:46:33 -0800 |
commit | 350775b472e57c4dbd1b35fd8d827b099c7b0739 (patch) | |
tree | da5ada5ac75d270314b42b8da85c56a9edb116c8 /src/hypnotisml.lisp | |
parent | 9e81bf6a8fa8262566a33797aa9dfd51f40e80dc (diff) |
nits
Diffstat (limited to 'src/hypnotisml.lisp')
-rw-r--r-- | src/hypnotisml.lisp | 8 |
1 files changed, 3 insertions, 5 deletions
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))) |