Documentation for defadvice says:
around-advice is wrapped around the execution of the function
This explanation is not clear to me. So I decided to test, how it works, using this code:
(defun fun ()
(message "hi"))
(fun)
(defadvice fun (around around-fun activate)
(message "3"))
(fun)
Output:
hi
3
What is happening here? Why don't I see "hi" message after the advice is defined? Is function executed at all? Or the code, defined in advice is executed instead of the function?