emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/setup a090d3b 02/24: Add :advise macro to wrap advice-a


From: Stefan Monnier
Subject: [elpa] externals/setup a090d3b 02/24: Add :advise macro to wrap advice-add
Date: Thu, 25 Mar 2021 13:42:34 -0400 (EDT)

branch: externals/setup
commit a090d3b6708aa01e1093ff665dcda664e9602123
Author: Philip K <philipk@posteo.net>
Commit: Philip K <philipk@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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]