branch: externals/setup commit a090d3b6708aa01e1093ff665dcda664e9602123 Author: Philip K <phil...@posteo.net> Commit: Philip K <phil...@posteo.net>
Add :advise macro to wrap advice-add --- setup.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setup.el b/setup.el index e8ddaec..d158bd3 100644 --- a/setup.el +++ b/setup.el @@ -374,6 +374,15 @@ form (prepend VAR), VAL is prepended to VAR." :debug '(symbolp form) :repeatable t) +(setup-define :advise + (lambda (symbol where function) + `(advice-add ,symbol ,where ,function)) + :documentation "Add a piece of advice on a function. +See `advice-add' for more details." + :debug '(sexp sexp function-form) + :repeatable t + :after-loaded t) + (setup-define :also-load (lambda (feature) `(require ',feature))