Commit 4f389667 authored by Erik Huelsmann's avatar Erik Huelsmann

Use 'setq' whereever possible

parent ec0a4aa0
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
(current-news)) (current-news))
(block done (block done
(flet ((next-node () (flet ((next-node ()
(setf node (plump:next-sibling node)) (setq node (plump:next-sibling node))
(when (null node) (when (null node)
;;(print "DONE") ;;(print "DONE")
(return-from done)) (return-from done))
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
(:start (:start
(if (and (plump:element-p node) (if (and (plump:element-p node)
(equalp (plump:tag-name node) "html")) (equalp (plump:tag-name node) "html"))
(setf state :html (setq state :html
node (plump:first-child node)) node (plump:first-child node))
;; else ;; else
(next-node))) (next-node)))
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
(:html (:html
(if (and (plump:element-p node) (if (and (plump:element-p node)
(equalp (plump:tag-name node) "body")) (equalp (plump:tag-name node) "body"))
(setf state :body (setq state :body
node (plump:first-child node)) node (plump:first-child node))
;; else ;; else
(next-node))) (next-node)))
...@@ -145,14 +145,14 @@ ...@@ -145,14 +145,14 @@
(:body (:body
(if (and (plump:element-p node) (if (and (plump:element-p node)
(equalp (plump:tag-name node) "main")) (equalp (plump:tag-name node) "main"))
(setf state :main (setq state :main
node (plump:first-child node)) node (plump:first-child node))
(next-node))) (next-node)))
(:main (:main
(if (and (plump:element-p node) (if (and (plump:element-p node)
(equalp (plump:tag-name node) "h3")) (equalp (plump:tag-name node) "h3"))
(setf state :read-news-heading) (setq state :read-news-heading)
(next-node))) (next-node)))
(:read-news-heading (:read-news-heading
...@@ -162,14 +162,14 @@ ...@@ -162,14 +162,14 @@
(return-from done)) (return-from done))
;; Start a new one ;; Start a new one
(setf current-news (setq current-news
(plump:make-element news "section")) (plump:make-element news "section"))
(let ((title-node (shallow-copy-object node))) (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)) (plump:append-child current-news title-node))
(next-node) (next-node)
(setf state :read-news-content)) (setq state :read-news-content))
(:read-news-content (:read-news-content
;; We assume the node is a paragraph and we read its content ;; We assume the node is a paragraph and we read its content
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
(progn (progn
(plump:append-child current-news (shallow-copy-object node)) (plump:append-child current-news (shallow-copy-object node))
(next-node) (next-node)
(setf state :main)) (setq state :main))
;; else ;; else
(next-node))))))) (next-node)))))))
(plump:serialize news nil)))) (plump:serialize news nil))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment