all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 64757@debbugs.gnu.org
Subject: bug#64757: 30.0.50; Declare `defadvice` obsolete
Date: Fri, 21 Jul 2023 11:26:04 -0400	[thread overview]
Message-ID: <jwv4jlxnv69.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83r0p1252n.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 21 Jul 2023 08:42:40 +0300")

> ...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.
 \f
 * 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"]






  reply	other threads:[~2023-07-21 15:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-20 22:05 bug#64757: 30.0.50; Declare `defadvice` obsolete Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-21  5:42 ` Eli Zaretskii
2023-07-21 15:26   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-07-21 15:51     ` Eli Zaretskii
2023-08-04  3:44       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv4jlxnv69.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=64757@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.