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

Use 'setq' whereever possible

parent ec0a4aa0
......@@ -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))))
......
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