Wise men don’t need advice. Fools won’t take it.
No enemy is worse than bad advice.
Emacs has a facility to define “advice” these are pieces of code that run before, after, or around an already defined function. This article provides a good example.
How will this work? Before we try to make the macro, let’s focus on building up the functions. We want to have a function that we can substitute for the original function which will have a number of before, after, and around pieces of advice that can be attached to it.