aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorRichard Stallman2019-10-26 22:02:57 -0400
committerEli Zaretskii2019-11-01 11:45:51 +0200
commit8758c96dc7f252944eb97b95c92081b157084477 (patch)
treeae23d1c4053971c51983d0fb61ce7a5c9fd7edc9 /doc
parent2448cebf7620169b2a2bf27b5147b9a38defc8e4 (diff)
downloademacs-8758c96dc7f252944eb97b95c92081b157084477.tar.gz
emacs-8758c96dc7f252944eb97b95c92081b157084477.zip
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.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/functions.texi12
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index eced3a24474..12112508b01 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -1811,9 +1811,15 @@ possible to do the same thing via a hook, that is preferable
1811(@pxref{Hooks}). If you simply want to change what a particular key 1811(@pxref{Hooks}). If you simply want to change what a particular key
1812does, it may be better to write a new command, and remap the old 1812does, it may be better to write a new command, and remap the old
1813command's key bindings to the new one (@pxref{Remapping Commands}). 1813command's key bindings to the new one (@pxref{Remapping Commands}).
1814In particular, Emacs's own source files should not put advice on 1814
1815functions in Emacs. (There are currently a few exceptions to this 1815 If you are writing code for release, for others to use, try to avoid
1816convention, but we aim to correct them.) 1816including advice in it. If the function you want to advise has no
1817hook to do the job, please talk with the Emacs developers about adding
1818a suitable hook. Especially, Emacs's own source files should not put
1819advice on functions in Emacs. (There are currently a few exceptions
1820to this convention, but we aim to correct them.) It is generally
1821cleaner to create a new hook in @code{foo}, and make @code{bar} use
1822the hook, than to have @code{bar} put advice in @code{foo}.
1817 1823
1818 Special forms (@pxref{Special Forms}) cannot be advised, however macros can 1824 Special forms (@pxref{Special Forms}) cannot be advised, however macros can
1819be advised, in much the same way as functions. Of course, this will not affect 1825be advised, in much the same way as functions. Of course, this will not affect