1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-27 16:51:06 -07:00

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.
This commit is contained in:
Stefan Kangas 2023-08-24 00:54:37 +02:00
parent f46d6b0b39
commit cb3731361f
3 changed files with 5 additions and 12 deletions

View file

@ -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

View file

@ -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.

View file

@ -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