From cb3731361f0cf4222d39aedcfc5188f0063ebc5e Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 24 Aug 2023 00:54:37 +0200 Subject: [PATCH] Adjust documentation for defadvice obsoletion * doc/lispref/functions.texi (Porting Old Advice): Unequivocally say that 'defadvice' is obsolete. * doc/emacs/trouble.texi (Coding Standards): Refer to 'advice-add' instead of the now-obsolete 'defadvice'. (Bug#64757) * doc/misc/ses.texi (Uses of advice-add in SES): Rename node from "Uses of defadvice in SES". Remove 'undo-more' entry, since that advice was deleted in 2007. --- doc/emacs/trouble.texi | 2 +- doc/lispref/functions.texi | 2 +- doc/misc/ses.texi | 13 +++---------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index d2e8ac3452a..3a43203619b 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -1514,7 +1514,7 @@ Appendix, elisp, Emacs Lisp Reference}. @end ifclear @item -Avoid using @code{defadvice} or @code{with-eval-after-load} for Lisp code +Avoid using @code{advice-add} or @code{with-eval-after-load} for Lisp code to be included in Emacs. @item diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index af116f62973..53525e6b386 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -2177,7 +2177,7 @@ More specifically, the composition of the two functions behaves like: @findex defadvice @findex ad-activate -A lot of code uses the old @code{defadvice} mechanism, which is largely made +A lot of code uses the old @code{defadvice} mechanism, which has been made obsolete by the new @code{advice-add}, whose implementation and semantics is significantly simpler. diff --git a/doc/misc/ses.texi b/doc/misc/ses.texi index 15722056f33..c12656fc79e 100644 --- a/doc/misc/ses.texi +++ b/doc/misc/ses.texi @@ -1308,20 +1308,13 @@ avoid virus warnings, each function used in a formula needs (put 'your-function-name 'safe-function t) @end lisp -@node Uses of defadvice in @acronym{SES} -@section Uses of defadvice in @acronym{SES} -@findex defadvice -@findex undo-more +@node Uses of advice-add in @acronym{SES} +@section Uses of advice-add in @acronym{SES} +@findex advice-add @findex copy-region-as-kill @findex yank @table @code -@item undo-more -Defines a new undo element format (@var{fun} . @var{args}), which -means ``undo by applying @var{fun} to @var{args}''. For spreadsheet -buffers, it allows undos in the data area even though that's outside -the narrowing. - @item copy-region-as-kill When copying from the print area of a spreadsheet, treat the region as a rectangle and attach each cell's formula and printer as 'ses -- 2.39.2