From 27ed565ec6163c499191b62a4cee10d99019aa38 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 3 Aug 2023 23:41:11 -0400 Subject: [PATCH] * lisp/emacs-lisp/advice.el (defadvice): Mark as obsolete --- etc/NEWS | 4 ++++ lisp/emacs-lisp/advice.el | 1 + 2 files changed, 5 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 7b521f3e6fe..567f19012eb 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -685,6 +685,10 @@ provokes an error if used numerically. * Lisp Changes in Emacs 30.1 +** 'defadvice' is marked as obsolete. +See (info "(elisp)Porting Old Advice") for help converting them +to use `advice-add` or `define-advice instead. + +++ ** New user option 'safe-local-variable-directories'. This user option names directories in which Emacs will treat all diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index 56f0ae2212c..3265809f592 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -3131,6 +3131,7 @@ usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...) [DOCSTRING] [INTERACTIVE-FORM] BODY...)" (declare (doc-string 3) (indent 2) + (obsolete "use advice-add or define-advice" "30.1") (debug (&define name ;; thing being advised. (name ;; class is [&or "before" "around" "after" ;; "activation" "deactivation"] -- 2.39.2