[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64757: 30.0.50; Declare `defadvice` obsolete
From: |
Stefan Monnier |
Subject: |
bug#64757: 30.0.50; Declare `defadvice` obsolete |
Date: |
Fri, 21 Jul 2023 11:26:04 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
> ...this is too terse. We need to mention the two alternatives to
> defadvice, including pointers to the ELisp manual's nodes. People who
> still use defadvice will need those to convert their programs.
Something like that?
Stefan
diff --git a/etc/NEWS b/etc/NEWS
index c50f560282a..d22969444db 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -610,6 +610,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 @@ defadvice
[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"]