summaryrefslogtreecommitdiff
path: root/lispref/advice.texi
diff options
context:
space:
mode:
authorNick Roberts <nickrob@snap.net.nz>2006-01-13 23:25:48 +0000
committerNick Roberts <nickrob@snap.net.nz>2006-01-13 23:25:48 +0000
commit9f7f49fbb6ba5e70c5396dd58b0a3dcaf5ab97c4 (patch)
tree26f5b68618e2870dd920c11592554cbff7c1b663 /lispref/advice.texi
parent2ac77b5a4071183ab5ffa6423928f9bd6a6166a9 (diff)
downloademacs-9f7f49fbb6ba5e70c5396dd58b0a3dcaf5ab97c4.tar.gz
(Simple Advice): Update example to fit argument change in previous-line.
Diffstat (limited to 'lispref/advice.texi')
-rw-r--r--lispref/advice.texi7
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
this:
@example
-(defadvice previous-line (before next-line-at-end (arg))
+(defadvice previous-line (before next-line-at-end
+ (&optional arg try-vscroll))
"Insert an empty line when moving up from the top line."
(if (and next-line-add-newlines (= arg 1)
(save-excursion (beginning-of-line) (bobp)))
@@ -87,8 +88,8 @@ this:
@code{previous-line}. This piece of advice is named
@code{next-line-at-end}, and the symbol @code{before} says that it is
@dfn{before-advice} which should run before the regular definition of
-@code{previous-line}. @code{(arg)} specifies how the advice code can
-refer to the function's arguments.
+@code{previous-line}. @code{(&optional arg try-vscroll)} specifies
+how the advice code can refer to the function's arguments.
When this piece of advice runs, it creates an additional line, in the
situation where that is appropriate, but does not move point to that