Emacs 24.4 comes with a new advice system. The NEWS
file says:
** New package
nadvice.el
offers lighter-weight advice facilities. It is layered as:***
add-function
/remove-function
, which can be used to add/remove code on any function-carrying place, such as process filters or<foo>-function
hooks.***
advice-add
/advice-remove
to add/remove a piece of advice on a named function, much likedefadvice
does.
Q: What are the practical benefits and implications of this new package?
I am especially interested in answers addressing the following points:
If I am only using advice to customize Emacs (as opposed to writing add-on packages), do I need to switch to the new system? Will it replace the old system at some point?
What exactly can I do with the new system that I can't accomplish with
defadvice
?What is the significance of being able to "add/remove code on any function-carrying place"?