Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
9f7f49fb
Commit
9f7f49fb
authored
Jan 13, 2006
by
Nick Roberts
Browse files
(Simple Advice): Update example to fit argument change in previous-line.
parent
2ac77b5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
lispref/advice.texi
lispref/advice.texi
+4
-3
No files found.
lispref/advice.texi
View file @
9f7f49fb
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment