diff options
| author | Richard Stallman | 2019-10-26 22:02:57 -0400 |
|---|---|---|
| committer | Eli Zaretskii | 2019-11-01 11:45:51 +0200 |
| commit | 8758c96dc7f252944eb97b95c92081b157084477 (patch) | |
| tree | ae23d1c4053971c51983d0fb61ce7a5c9fd7edc9 /doc | |
| parent | 2448cebf7620169b2a2bf27b5147b9a38defc8e4 (diff) | |
| download | emacs-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.texi | 12 |
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 |
| 1812 | does, it may be better to write a new command, and remap the old | 1812 | does, it may be better to write a new command, and remap the old |
| 1813 | command's key bindings to the new one (@pxref{Remapping Commands}). | 1813 | command's key bindings to the new one (@pxref{Remapping Commands}). |
| 1814 | In particular, Emacs's own source files should not put advice on | 1814 | |
| 1815 | functions 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 |
| 1816 | convention, but we aim to correct them.) | 1816 | including advice in it. If the function you want to advise has no |
| 1817 | hook to do the job, please talk with the Emacs developers about adding | ||
| 1818 | a suitable hook. Especially, Emacs's own source files should not put | ||
| 1819 | advice on functions in Emacs. (There are currently a few exceptions | ||
| 1820 | to this convention, but we aim to correct them.) It is generally | ||
| 1821 | cleaner to create a new hook in @code{foo}, and make @code{bar} use | ||
| 1822 | the 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 |
| 1819 | be advised, in much the same way as functions. Of course, this will not affect | 1825 | be advised, in much the same way as functions. Of course, this will not affect |