summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/hypnotisml.lisp8
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)))