Replace ‘goto-line’ with ‘forward-line’
According to the documentation of ‘goto-line’, it's usually not what you want for a lisp program. It's not entirely clear why, but I suspect it has something to do with either hooks run, or some effect it'll have on state. This commit replaces it with the suggested (goto-char (point-min)) (forward-line (-1 N)) Where N is the argument previously given to ‘goto-line’.
This commit is contained in:
parent
bab0d7083d
commit
3d066413de
1 changed files with 4 additions and 2 deletions
6
vc-p4.el
6
vc-p4.el
|
@ -822,7 +822,8 @@ _VERSION is ignored."
|
|||
((string= op "d")
|
||||
(setq ra (1+ ra))))
|
||||
(with-current-buffer ch-buffer
|
||||
(goto-line la)
|
||||
(goto-char (point-min))
|
||||
(forward-line (1- la))
|
||||
(let ((beg (point)))
|
||||
(forward-line (1+ (- lb la)))
|
||||
(delete-region beg (point)))
|
||||
|
@ -844,7 +845,8 @@ _VERSION is ignored."
|
|||
" "))
|
||||
xth-rev xth-date xth-auth)
|
||||
(with-current-buffer buffer
|
||||
(goto-line 2)
|
||||
(goto-char (point-min))
|
||||
(forward-line 1)
|
||||
(move-to-column 0)
|
||||
(insert (format "%10s %7s %6s %4s\n" "Date" "Author" "Change" "Rev"))
|
||||
(while (setq line (vc-p4-read-output ch-buffer))
|
||||
|
|
Loading…
Reference in a new issue