Subject: bug#6892: Please add a way to jump to advices

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 10 May 2022 04:01:35 +0200

Stefan Monnier <[email-masked]> writes:

> But it should work if you do
>
>     (advice-add 'bar :before #'bar--skip-line)
>     (defun bar--skip-line () (forward-line 1))

Ah, yes, and then we get a nice link, so that's fine.

>> I'm sure this has come up before -- does advice add no pointers (to
>> load-history, I guess?) that the help system could pick up?
>
> `define-advice` could, but `advice-add` is definitely not limited to
> uses at top-level, so it shouldn't mess with `load-history`.

And it seems like define-advice already does everything right here.  With:

(defun bar ()
  (interactive)
  (forward-line 1))

(define-advice bar (:around (oldfun &rest args) test)
  (apply oldfun args))

load-history gets:

 ("/tmp/ad.el"
  (defun . bar)
  (defun . bar@test))

And everything is buttonified as requested in the bug report, so I guess
everything here has been fixed in the years since this was reported, and
I'm therefore closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no