blob: dd7af501f42274c9c3ed51e9876ea238a06e0a5b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
(ns swank.util.hooks)
(defmacro defhook [name & hooks]
`(defonce ~name (ref (list ~@hooks))))
;;;; Hooks
(defn add-hook [place function]
(dosync (alter place conj function)))
(defn run-hook [functions & arguments]
(doseq [f @functions]
(apply f arguments)))
|