bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Lars Ingebrigtsen
Subject: bug#6892: Please add a way to jump to advices
Date: Tue, 10 May 2022 04:01:35 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> 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))

PNG image

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]