atlas-engineer / nhooks

MIT License
18 stars 5 forks source link

+TITLE: NHooks

/A hook facility for Common Lisp./

This package holds an enhanced implementation of hooks (extension points). It works similarly to Emacs hooks with crucial improvements:

** Example

+begin_src lisp

(let ((hook (make-instance 'nhooks:hook-number->number :handlers (list #'add-1 #'multiply-by-2) :combination #'nhooks:combine-composed-hook))) (nhooks:run-hook hook 17)) ;; => 35

+end_src

See the [[file:package.lisp][package]] documentation for a usage guide and more examples.

** Road-map

** History

This library was originally contributed by the maintainers of the [[https://nyxt-browser.com/][Nyxt]] web browser to [[https://github.com/ruricolist/serapeum][Serapeum]]. Then it got overhauled and backward compatibility broke, so a dedicated library was published instead. The Serapeum contrib is considered deprecated.

** Change log

*** 1.2.2

*** 1.2.1

*** 1.2.0

*** 1.1.1

*** 1.1.0