3 ms·
I can see this being used to perform print debugging or elisp-style function advice. https://www.gnu.org/software/emacs/manual/html_node/elisp/Advising-Functio
by dleslie 7y ago
I can see this being used to perform print debugging or elisp-style function advice.
https://www.gnu.org/software/emacs/manual/html_node/elisp/Advising-Functions.html https://www.gnu.org/software/emacs/manual/html_node/elisp/Ad...
- yarg 7y agoSee aspect oriented programming and cross-cutting concerns.
- dfox 7y agodefadvice is ugly elisp hack that implements just enough of CLOS that you need for some interesting subset of aspect oriented programming.
- Someone 7y agoHow? It allows you can add the jump to your code, but doesn’t provide a method to jump back to the original code.
- dleslie 7y agoIf it takes a parameter, as mentioned it sometimes does, then the advising function can jump back to an address given by a parameter, +1. Ie, comefrom 80 ... stuff goto 81 You then design your methods to always have a NOP at the start, to allow comefrom to inject its jump.