
longer any need to restart the server. * Added a 'hook-file option that specifies a module providing a generic hook. Useful for notifications when important things happen, but can be used for anything. Reloaded on change too. svn: r5463
19 lines
494 B
Scheme
19 lines
494 B
Scheme
(module hooker mzscheme
|
|
(require "config.ss" "logger.ss" "reloadable.ss")
|
|
|
|
(provide hook)
|
|
|
|
(define hook-file #f)
|
|
(define hook-proc #f)
|
|
|
|
(define (hook what alist)
|
|
(let ([file (get-conf 'hook-file)])
|
|
(when file
|
|
(unless (equal? file hook-file)
|
|
(set! hook-file file)
|
|
(set! hook-proc (auto-reload-procedure `(file ,(path->string file))
|
|
'hook)))
|
|
(hook-proc what (current-session) alist))))
|
|
|
|
)
|