Clarify n-1, etc. in example.

This commit is contained in:
Richard M. Stallman 2001-09-10 05:01:06 +00:00
parent 02f34c7046
commit e54465863b

View file

@ -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