Commit 8758c96d authored by Richard Stallman's avatar Richard Stallman Committed by Eli Zaretskii

Minor wording change in ELisp manual

* doc/lispref/functions.texi (Advising Named Functions):
Improve and clarify wording of the advice to avoid advising
functions in released code.
parent 2448cebf
Pipeline #3885 failed with stage
in 65 minutes and 37 seconds
......@@ -1811,9 +1811,15 @@ possible to do the same thing via a hook, that is preferable
(@pxref{Hooks}). If you simply want to change what a particular key
does, it may be better to write a new command, and remap the old
command's key bindings to the new one (@pxref{Remapping Commands}).
In particular, Emacs's own source files should not put advice on
functions in Emacs. (There are currently a few exceptions to this
convention, but we aim to correct them.)
If you are writing code for release, for others to use, try to avoid
including advice in it. If the function you want to advise has no
hook to do the job, please talk with the Emacs developers about adding
a suitable hook. Especially, Emacs's own source files should not put
advice on functions in Emacs. (There are currently a few exceptions
to this convention, but we aim to correct them.) It is generally
cleaner to create a new hook in @code{foo}, and make @code{bar} use
the hook, than to have @code{bar} put advice in @code{foo}.
Special forms (@pxref{Special Forms}) cannot be advised, however macros can
be advised, in much the same way as functions. Of course, this will not affect
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment