diff options
| author | Nick Roberts | 2006-01-13 23:25:48 +0000 |
|---|---|---|
| committer | Nick Roberts | 2006-01-13 23:25:48 +0000 |
| commit | 9f7f49fbb6ba5e70c5396dd58b0a3dcaf5ab97c4 (patch) | |
| tree | 26f5b68618e2870dd920c11592554cbff7c1b663 | |
| parent | 2ac77b5a4071183ab5ffa6423928f9bd6a6166a9 (diff) | |
| download | emacs-9f7f49fbb6ba5e70c5396dd58b0a3dcaf5ab97c4.tar.gz emacs-9f7f49fbb6ba5e70c5396dd58b0a3dcaf5ab97c4.zip | |
(Simple Advice): Update example to fit argument change in previous-line.
| -rw-r--r-- | lispref/advice.texi | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lispref/advice.texi b/lispref/advice.texi index 8299e13ac10..595649303ed 100644 --- a/lispref/advice.texi +++ b/lispref/advice.texi | |||
| @@ -74,7 +74,8 @@ actually changing or even seeing that definition. Here is how to do | |||
| 74 | this: | 74 | this: |
| 75 | 75 | ||
| 76 | @example | 76 | @example |
| 77 | (defadvice previous-line (before next-line-at-end (arg)) | 77 | (defadvice previous-line (before next-line-at-end |
| 78 | (&optional arg try-vscroll)) | ||
| 78 | "Insert an empty line when moving up from the top line." | 79 | "Insert an empty line when moving up from the top line." |
| 79 | (if (and next-line-add-newlines (= arg 1) | 80 | (if (and next-line-add-newlines (= arg 1) |
| 80 | (save-excursion (beginning-of-line) (bobp))) | 81 | (save-excursion (beginning-of-line) (bobp))) |
| @@ -87,8 +88,8 @@ this: | |||
| 87 | @code{previous-line}. This piece of advice is named | 88 | @code{previous-line}. This piece of advice is named |
| 88 | @code{next-line-at-end}, and the symbol @code{before} says that it is | 89 | @code{next-line-at-end}, and the symbol @code{before} says that it is |
| 89 | @dfn{before-advice} which should run before the regular definition of | 90 | @dfn{before-advice} which should run before the regular definition of |
| 90 | @code{previous-line}. @code{(arg)} specifies how the advice code can | 91 | @code{previous-line}. @code{(&optional arg try-vscroll)} specifies |
| 91 | refer to the function's arguments. | 92 | how the advice code can refer to the function's arguments. |
| 92 | 93 | ||
| 93 | When this piece of advice runs, it creates an additional line, in the | 94 | When this piece of advice runs, it creates an additional line, in the |
| 94 | situation where that is appropriate, but does not move point to that | 95 | situation where that is appropriate, but does not move point to that |