From: Stefan Monnier Date: Fri, 4 Aug 2023 03:41:11 +0000 (-0400) Subject: * lisp/emacs-lisp/advice.el (defadvice): Mark as obsolete X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=27ed565ec6163c499191b62a4cee10d99019aa38;p=emacs.git * lisp/emacs-lisp/advice.el (defadvice): Mark as obsolete --- 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"]