summaryrefslogtreecommitdiff
path: root/lispref/advice.texi
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2001-09-10 05:01:06 +0000
committerRichard M. Stallman <rms@gnu.org>2001-09-10 05:01:06 +0000
commite54465863b9fc6bd14b8d7d4062a0dd1d29fa7e0 (patch)
tree76012b3edd0d808ea2630043171512a7036edc76 /lispref/advice.texi
parent02f34c7046309acb4772efc0d847a93e752f5b4e (diff)
downloademacs-e54465863b9fc6bd14b8d7d4062a0dd1d29fa7e0.tar.gz
Clarify n-1, etc. in example.
Diffstat (limited to 'lispref/advice.texi')
-rw-r--r--lispref/advice.texi21
1 files changed, 11 insertions, 10 deletions
diff --git a/lispref/advice.texi b/lispref/advice.texi
index bfb69cc3ee5..3221753a1fc 100644
--- a/lispref/advice.texi
+++ b/lispref/advice.texi
@@ -684,10 +684,11 @@ specifies the argument list for the function @code{fset}.
@node Combined Definition
@section The Combined Definition
- Suppose that a function has @var{n} pieces of before-advice, @var{m}
-pieces of around-advice and @var{k} pieces of after-advice. Assuming no
-piece of advice is protected, the combined definition produced to
-implement the advice for a function looks like this:
+ Suppose that a function has @var{n} pieces of before-advice
+(numbered from 0 through @var{n}@minus{}1), @var{m} pieces of
+around-advice and @var{k} pieces of after-advice. Assuming no piece
+of advice is protected, the combined definition produced to implement
+the advice for a function looks like this:
@example
(lambda @var{arglist}
@@ -695,20 +696,20 @@ implement the advice for a function looks like this:
(let (ad-return-value)
@r{before-0-body-form}...
....
- @r{before-@var{n}-1-body-form}...
+ @r{before-@var{n}@minus{}1-body-form}...
@r{around-0-body-form}...
@r{around-1-body-form}...
....
- @r{around-@var{m}-1-body-form}...
+ @r{around-@var{m}@minus{}1-body-form}...
(setq ad-return-value
@r{apply original definition to @var{arglist}})
- @r{other-around-@var{m}-1-body-form}...
+ @r{end-of-around-@var{m}@minus{}1-body-form}...
....
- @r{other-around-1-body-form}...
- @r{other-around-0-body-form}...
+ @r{end-of-around-1-body-form}...
+ @r{end-of-around-0-body-form}...
@r{after-0-body-form}...
....
- @r{after-@var{k}-1-body-form}...
+ @r{after-@var{k}@minus{}1-body-form}...
ad-return-value))
@end example