fix all hooks: lists weren't passed as symbols
;; based on which-key
(when (buffer-live-p buffer)
(quit-windows-on buffer)
- (run-hooks snitch-log-filter-window-close-hook)))
+ (run-hooks 'snitch-log-filter-window-close-hook)))
(defun snitch--log-filter-window-size-to-fit (window)
"Resize log filter window to a reasonable height and maximum
(display-buffer-reuse-window snitch--log-filter-buffer alist))
(t
(display-buffer-in-side-window snitch--log-filter-buffer alist)))
- (run-hooks snitch-log-filter-window-open-hook)))
+ (run-hooks 'snitch-log-filter-window-open-hook)))
(provide 'snitch-log)
(cl-loop for (f-fn . f-args) in decision-list
;; when event is in the white/blacklist, and no
;; hooks override the list, return t.
- when (and (apply f-fn (cons event f-args))
- (run-hook-with-args-until-failure list-hook-fns
- 'list-evt-type
- event))
- return t
+ when (apply f-fn (cons event f-args))
+ return (run-hook-with-args-until-failure list-hook-fns
+ 'list-evt-type
+ event)
;; otherwise fall back on default policy
finally return
(if (run-hook-with-args-until-failure default-hook-fns
indicate the type of event. Registered hooks are called before
making the final decision, and the decision is logged based on
the globally configured log filters."
- (when (run-hook-with-args-until-failure snitch-on-event-functions
+ (when (run-hook-with-args-until-failure 'snitch-on-event-functions
'event
event)
(snitch--log 'all event)
(snitch--decide event
wl
'whitelist
- snitch-on-whitelist-functions
+ 'snitch-on-whitelist-functions
'block
- snitch-on-block-functions))
+ 'snitch-on-block-functions))
(t ;; policy allow
(snitch--decide event
bl
'blacklist
- snitch-on-blacklist-functions
+ 'snitch-on-blacklist-functions
'allow
- snitch-on-allow-functions)))))
+ 'snitch-on-allow-functions)))))
(cond ((eq policy 'deny)
(progn
(snitch--log (if decision wled blk) event)