Commit 94d072a9 authored by Philipp Marek's avatar Philipp Marek
Browse files

DEF-RENDER-HOOK: Store symbols on *RENDER-HOOK*.

PUSHing the functions themselves means that the hooks get installed
every time the DEF-RENDER-HOOK forms get evaluated, even if they
already exist.
Using PUSHNEW and the symbols avoid that.

To reproduce, just
  (load "build.lisp")
  touch cl-site.asd # force asdf to reload the system
  (load "build.lisp")
and the output will show multiple identical lines - once
for each time the system got loaded.
  Transforming to libraries.html
  Transforming to libraries.html
  Transforming to libraries.html
parent 35680509
......@@ -89,7 +89,7 @@
(flet ((call-next-hook (content context)
(funcall (pop ,next-hooks-sym) content context ,next-hooks-sym)))
(push (function ,name) *render-hooks*))))
(pushnew ',name *render-hooks*))))
(defun render-page-with-hooks (content context)
(let ((hooks (reverse (cons #'(lambda (p c next-processors)
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