diff --git a/process.lisp b/process.lisp index 9fd47acae3de1889e8bae2eef451872805e530cf..a2c9fb4dddb3d7b92c3370151e6c9d8e633788a7 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))))