From 4f389667bdd73ae33a729147cc24286eef5b6033 Mon Sep 17 00:00:00 2001 From: Erik Huelsmann Date: Sun, 28 Oct 2018 17:12:06 +0000 Subject: [PATCH] Use 'setq' whereever possible --- process.lisp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/process.lisp b/process.lisp index 9fd47ac..a2c9fb4 100644 --- a/process.lisp +++ b/process.lisp @@ -117,7 +117,7 @@ (current-news)) (block done (flet ((next-node () - (setf node (plump:next-sibling node)) + (setq node (plump:next-sibling node)) (when (null node) ;;(print "DONE") (return-from done)) @@ -129,7 +129,7 @@ (:start (if (and (plump:element-p node) (equalp (plump:tag-name node) "html")) - (setf state :html + (setq state :html node (plump:first-child node)) ;; else (next-node))) @@ -137,7 +137,7 @@ (:html (if (and (plump:element-p node) (equalp (plump:tag-name node) "body")) - (setf state :body + (setq state :body node (plump:first-child node)) ;; else (next-node))) @@ -145,14 +145,14 @@ (:body (if (and (plump:element-p node) (equalp (plump:tag-name node) "main")) - (setf state :main + (setq state :main node (plump:first-child node)) (next-node))) (:main (if (and (plump:element-p node) (equalp (plump:tag-name node) "h3")) - (setf state :read-news-heading) + (setq state :read-news-heading) (next-node))) (:read-news-heading @@ -162,14 +162,14 @@ (return-from done)) ;; Start a new one - (setf current-news + (setq current-news (plump:make-element news "section")) (let ((title-node (shallow-copy-object node))) - (setf (plump:tag-name title-node) "h7") + (setq (plump:tag-name title-node) "h7") (plump:append-child current-news title-node)) (next-node) - (setf state :read-news-content)) + (setq state :read-news-content)) (:read-news-content ;; We assume the node is a paragraph and we read its content @@ -178,7 +178,7 @@ (progn (plump:append-child current-news (shallow-copy-object node)) (next-node) - (setf state :main)) + (setq state :main)) ;; else (next-node))))))) (plump:serialize news nil)))) -- GitLab