[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 8758c96: Minor wording change in ELisp manual
From: |
Eli Zaretskii |
Subject: |
master 8758c96: Minor wording change in ELisp manual |
Date: |
Fri, 1 Nov 2019 05:46:44 -0400 (EDT) |
branch: master
commit 8758c96dc7f252944eb97b95c92081b157084477
Author: Richard Stallman <address@hidden>
Commit: Eli Zaretskii <address@hidden>
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.
---
doc/lispref/functions.texi | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index eced3a2..1211250 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
(@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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 8758c96: Minor wording change in ELisp manual,
Eli Zaretskii <=