Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
bf6a77f3
Commit
bf6a77f3
authored
Jan 05, 2014
by
Daniel Colascione
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix defun navigation in vc log view.
parent
d5081c1e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
12 deletions
+47
-12
lisp/ChangeLog
lisp/ChangeLog
+14
-0
lisp/vc/log-view.el
lisp/vc/log-view.el
+33
-12
No files found.
lisp/ChangeLog
View file @
bf6a77f3
2014-01-06 Daniel Colascione <dancol@dancol.org>
Fix defun navigation in vc log view.
* vc/log-view.el (log-view-beginning-of-defun): Rewrite to behave
like `beginning-of-defun'.
(log-view-end-of-defun,log-view-end-of-defun-1): Rename old
log-view-end-of-defun to log-view-end-of-defun-1. Replace
log-view-end-of-defun with wrapper that behaves like
`end-of-defun'.
(log-view-extract-comment): Call `log-view-current-entry' directly
instead of relying on broken `log-view-beginning-of-defun'
behavior.
2014-01-06 Paul Eggert <eggert@cs.ucla.edu>
Spelling fixes.
...
...
lisp/vc/log-view.el
View file @
bf6a77f3
...
...
@@ -429,18 +429,28 @@ to the beginning of the ARGth following entry.
This is Log View mode's default `beginning-of-defun-function'.
It assumes that a log entry starts with a line matching
`log-view-message-re'."
(
if
(
or
(
null
arg
)
(
zerop
arg
))
(
setq
arg
1
))
(
when
(
null
arg
)
(
setf
arg
1
))
(
if
(
<
arg
0
)
(
dotimes
(
_n
(
-
arg
))
(
log-view-end-of-defun
))
(
catch
'beginning-of-buffer
(
dotimes
(
_n
arg
)
(
or
(
log-view-current-entry
nil
t
)
(
throw
'beginning-of-buffer
nil
)))
(
point
))))
(
defun
log-view-end-of-defun
()
(
log-view-end-of-defun
(
-
arg
))
(
let
((
found
t
))
(
while
(
>
arg
0
)
(
setf
arg
(
1-
arg
))
(
let
((
cur-start
(
log-view-current-entry
)))
(
setf
found
(
cond
((
null
cur-start
)
(
goto-char
(
point-min
))
nil
)
((
>=
(
car
cur-start
)
(
point
))
(
unless
(
bobp
)
(
forward-line
-1
)
(
setf
arg
(
1+
arg
)))
nil
)
(
t
(
goto-char
(
car
cur-start
))
t
)))))
found
)))
(
defun
log-view-end-of-defun-1
()
"Move forward to the next Log View entry."
(
let
((
looping
t
))
(
if
(
looking-at
log-view-message-re
)
...
...
@@ -457,6 +467,16 @@ It assumes that a log entry starts with a line matching
(
setq
looping
nil
)
(
forward-line
-1
))))))
(
defun
log-view-end-of-defun
(
&optional
arg
)
"Move forward to the next Log View entry.
Works like `end-of-defun'."
(
when
(
null
arg
)
(
setf
arg
1
))
(
if
(
<
arg
0
)
(
log-view-beginning-of-defun
(
-
arg
))
(
dotimes
(
_n
arg
)
(
log-view-end-of-defun-1
)
t
)))
(
defvar
cvs-minor-current-files
)
(
defvar
cvs-branch-prefix
)
(
defvar
cvs-secondary-branch-prefix
)
...
...
@@ -511,7 +531,8 @@ If called interactively, visit the version at point."
(
cond
((
eq
backend
'SVN
)
(
forward-line
-1
)))
(
setq
en
(
point
))
(
log-view-beginning-of-defun
)
(
or
(
log-view-current-entry
nil
t
)
(
throw
'beginning-of-buffer
nil
))
(
cond
((
memq
backend
'
(
SCCS
RCS
CVS
MCVS
SVN
))
(
forward-line
2
))
((
eq
backend
'Hg
)
...
...
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