+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
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.
(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
(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)