advice. This is what "advice--called-interactively-skip" does.
(Although
reading through it I don't see where the bug is that prevents it
recognizing
the before advice in my example.)
Exactly. I think we need to fix this problem. It really should work.
If all advised functions are wrapped by a call to the above function
"wrap-function-in-indicator-lambda",
All functions advised with a non-:around advice have such
a "recognizable wrapper"; and that's indeed what
advice--called-interactively-skip checks in
(and (eq (nth 1 frame2) 'apply)
(progn
(funcall get-next-frame)
(advice--p (indirect-function (nth 1 frame2)))))
IOW the nadvice.el machinery is itself the recognizable wrapper.
Not sure why this fails in your test case, tho.
For :around advices, the machinery does not provide a recognizable
wrapper, so we might want to add an ad-hoc wrapper like you suggest for
those cases, tho maybe we can avoid the cost of such a wrapper, by
keeping the so-advised inner-functions in a hash-table (so we can still
recognize them, even tho they're not tagged directly in the backtrace).
So, I think the first thing is to figure out why your test case fails.
Stefan