diff options
| author | Richard M. Stallman | 2001-09-10 05:01:06 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2001-09-10 05:01:06 +0000 |
| commit | e54465863b9fc6bd14b8d7d4062a0dd1d29fa7e0 (patch) | |
| tree | 76012b3edd0d808ea2630043171512a7036edc76 | |
| parent | 02f34c7046309acb4772efc0d847a93e752f5b4e (diff) | |
| download | emacs-e54465863b9fc6bd14b8d7d4062a0dd1d29fa7e0.tar.gz emacs-e54465863b9fc6bd14b8d7d4062a0dd1d29fa7e0.zip | |
Clarify n-1, etc. in example.
| -rw-r--r-- | lispref/advice.texi | 21 |
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}. | |||
| 684 | @node Combined Definition | 684 | @node Combined Definition |
| 685 | @section The Combined Definition | 685 | @section The Combined Definition |
| 686 | 686 | ||
| 687 | Suppose that a function has @var{n} pieces of before-advice, @var{m} | 687 | Suppose that a function has @var{n} pieces of before-advice |
| 688 | pieces of around-advice and @var{k} pieces of after-advice. Assuming no | 688 | (numbered from 0 through @var{n}@minus{}1), @var{m} pieces of |
| 689 | piece of advice is protected, the combined definition produced to | 689 | around-advice and @var{k} pieces of after-advice. Assuming no piece |
| 690 | implement the advice for a function looks like this: | 690 | of advice is protected, the combined definition produced to implement |
| 691 | the advice for a function looks like this: | ||
| 691 | 692 | ||
| 692 | @example | 693 | @example |
| 693 | (lambda @var{arglist} | 694 | (lambda @var{arglist} |
| @@ -695,20 +696,20 @@ implement the advice for a function looks like this: | |||
| 695 | (let (ad-return-value) | 696 | (let (ad-return-value) |
| 696 | @r{before-0-body-form}... | 697 | @r{before-0-body-form}... |
| 697 | .... | 698 | .... |
| 698 | @r{before-@var{n}-1-body-form}... | 699 | @r{before-@var{n}@minus{}1-body-form}... |
| 699 | @r{around-0-body-form}... | 700 | @r{around-0-body-form}... |
| 700 | @r{around-1-body-form}... | 701 | @r{around-1-body-form}... |
| 701 | .... | 702 | .... |
| 702 | @r{around-@var{m}-1-body-form}... | 703 | @r{around-@var{m}@minus{}1-body-form}... |
| 703 | (setq ad-return-value | 704 | (setq ad-return-value |
| 704 | @r{apply original definition to @var{arglist}}) | 705 | @r{apply original definition to @var{arglist}}) |
| 705 | @r{other-around-@var{m}-1-body-form}... | 706 | @r{end-of-around-@var{m}@minus{}1-body-form}... |
| 706 | .... | 707 | .... |
| 707 | @r{other-around-1-body-form}... | 708 | @r{end-of-around-1-body-form}... |
| 708 | @r{other-around-0-body-form}... | 709 | @r{end-of-around-0-body-form}... |
| 709 | @r{after-0-body-form}... | 710 | @r{after-0-body-form}... |
| 710 | .... | 711 | .... |
| 711 | @r{after-@var{k}-1-body-form}... | 712 | @r{after-@var{k}@minus{}1-body-form}... |
| 712 | ad-return-value)) | 713 | ad-return-value)) |
| 713 | @end example | 714 | @end example |
| 714 | 715 | ||