(vc-annotate): Arrange for point to end up at the same

line number as in the original, but only when using a new buffer.
This commit is contained in:
Thien-Thi Nguyen 2006-04-13 13:36:54 +00:00
parent 1007cd5f2b
commit 1867d8cbc5
2 changed files with 13 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2006-04-13 Thien-Thi Nguyen <ttn@gnu.org>
* vc.el (vc-annotate): Arrange for point to end up at the same
line number as in the original, but only when using a new buffer.
2006-04-12 Davis Herring <herring@lanl.gov> (tiny change)
* files.el (hack-one-local-variable-eval-safep): Recognize
@ -21,7 +26,7 @@
2006-04-13 Nick Roberts <nickrob@snap.net.nz>
* progmodes/gdb-ui.el (gdb-set-gud-minor-mode-existing-buffers):
* progmodes/gdb-ui.el (gdb-set-gud-minor-mode-existing-buffers):
GDB 6.1+ gives full filename for "info sources" so use
file-name-nondirectory.

View file

@ -3107,7 +3107,11 @@ colors. `vc-annotate-background' specifies the background color."
(vc-ensure-vc-buffer)
(setq vc-annotate-display-mode display-mode) ;Not sure why. --Stef
(let* ((temp-buffer-name (format "*Annotate %s (rev %s)*" (buffer-name) rev))
(temp-buffer-show-function 'vc-annotate-display-select))
(temp-buffer-show-function 'vc-annotate-display-select)
;; If BUF is specified, we presume the caller maintains current line,
;; so we don't need to do it here. This implementation may give
;; strange results occasionally in the case of REV != WORKFILE-REV.
(current-line (unless buf (line-number-at-pos))))
(message "Annotating...")
;; If BUF is specified it tells in which buffer we should put the
;; annotations. This is used when switching annotations to another
@ -3129,6 +3133,8 @@ colors. `vc-annotate-background' specifies the background color."
(set (make-local-variable 'vc-annotate-parent-rev) rev)
(set (make-local-variable 'vc-annotate-parent-display-mode)
display-mode)))
(when current-line
(goto-line current-line temp-buffer-name))
(message "Annotating... done")))
(defun vc-annotate-prev-version (prefix)