hydra icon indicating copy to clipboard operation
hydra copied to clipboard

Port defadvice to define-advice

Open TOTBWF opened this issue 1 year ago • 3 comments

As of Emacs 30.1, defadvice has been marked obselete, and can lead to byte-compilation errors. Luckily, this is easy to fix; all we need to do is to replace invocations of defadvice with define-advice.

This also comes with some other minor benefits: we can remove the surrounding eval-after-load 'find-func from our advice, as define-advice can be used to advise functions that are not yet been defined.

TOTBWF avatar Sep 14 '24 21:09 TOTBWF

Do I understand this pull request correctly: you are introducing some changes to the project’s codebase that will make it incompatible with Emacs versions < 30?

sergeyklay avatar Dec 09 '24 00:12 sergeyklay

No, define-advice has been available since Emacs 25.1.

TOTBWF avatar Dec 09 '24 02:12 TOTBWF

No, define-advice has been available since Emacs 25.1.

Thanks!

sergeyklay avatar Dec 09 '24 08:12 sergeyklay

Closing as https://github.com/abo-abo/hydra/commit/59a2a45a35027948476d1d7751b0f0215b1e61aa removed the problematic advice.

TOTBWF avatar Apr 18 '25 18:04 TOTBWF