diff options
| author | Thien-Thi Nguyen | 2006-04-13 13:36:54 +0000 |
|---|---|---|
| committer | Thien-Thi Nguyen | 2006-04-13 13:36:54 +0000 |
| commit | 1867d8cbc577bccc5dcc900a114f47daa48192a7 (patch) | |
| tree | f3c6dfd8f44930950676f707c59d78859a212dc8 | |
| parent | 1007cd5f2beb810ee16e830e6bf84d9907ab76d3 (diff) | |
| download | emacs-1867d8cbc577bccc5dcc900a114f47daa48192a7.tar.gz emacs-1867d8cbc577bccc5dcc900a114f47daa48192a7.zip | |
(vc-annotate): Arrange for point to end up at the same
line number as in the original, but only when using a new buffer.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/vc.el | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9048ac64fe3..b607a1eec27 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2006-04-13 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 2 | |||
| 3 | * vc.el (vc-annotate): Arrange for point to end up at the same | ||
| 4 | line number as in the original, but only when using a new buffer. | ||
| 5 | |||
| 1 | 2006-04-12 Davis Herring <herring@lanl.gov> (tiny change) | 6 | 2006-04-12 Davis Herring <herring@lanl.gov> (tiny change) |
| 2 | 7 | ||
| 3 | * files.el (hack-one-local-variable-eval-safep): Recognize | 8 | * files.el (hack-one-local-variable-eval-safep): Recognize |
| @@ -21,7 +26,7 @@ | |||
| 21 | 26 | ||
| 22 | 2006-04-13 Nick Roberts <nickrob@snap.net.nz> | 27 | 2006-04-13 Nick Roberts <nickrob@snap.net.nz> |
| 23 | 28 | ||
| 24 | * progmodes/gdb-ui.el (gdb-set-gud-minor-mode-existing-buffers): | 29 | * progmodes/gdb-ui.el (gdb-set-gud-minor-mode-existing-buffers): |
| 25 | GDB 6.1+ gives full filename for "info sources" so use | 30 | GDB 6.1+ gives full filename for "info sources" so use |
| 26 | file-name-nondirectory. | 31 | file-name-nondirectory. |
| 27 | 32 | ||
diff --git a/lisp/vc.el b/lisp/vc.el index 9a782b4f11d..61b8aa05a4b 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -3107,7 +3107,11 @@ colors. `vc-annotate-background' specifies the background color." | |||
| 3107 | (vc-ensure-vc-buffer) | 3107 | (vc-ensure-vc-buffer) |
| 3108 | (setq vc-annotate-display-mode display-mode) ;Not sure why. --Stef | 3108 | (setq vc-annotate-display-mode display-mode) ;Not sure why. --Stef |
| 3109 | (let* ((temp-buffer-name (format "*Annotate %s (rev %s)*" (buffer-name) rev)) | 3109 | (let* ((temp-buffer-name (format "*Annotate %s (rev %s)*" (buffer-name) rev)) |
| 3110 | (temp-buffer-show-function 'vc-annotate-display-select)) | 3110 | (temp-buffer-show-function 'vc-annotate-display-select) |
| 3111 | ;; If BUF is specified, we presume the caller maintains current line, | ||
| 3112 | ;; so we don't need to do it here. This implementation may give | ||
| 3113 | ;; strange results occasionally in the case of REV != WORKFILE-REV. | ||
| 3114 | (current-line (unless buf (line-number-at-pos)))) | ||
| 3111 | (message "Annotating...") | 3115 | (message "Annotating...") |
| 3112 | ;; If BUF is specified it tells in which buffer we should put the | 3116 | ;; If BUF is specified it tells in which buffer we should put the |
| 3113 | ;; annotations. This is used when switching annotations to another | 3117 | ;; annotations. This is used when switching annotations to another |
| @@ -3129,6 +3133,8 @@ colors. `vc-annotate-background' specifies the background color." | |||
| 3129 | (set (make-local-variable 'vc-annotate-parent-rev) rev) | 3133 | (set (make-local-variable 'vc-annotate-parent-rev) rev) |
| 3130 | (set (make-local-variable 'vc-annotate-parent-display-mode) | 3134 | (set (make-local-variable 'vc-annotate-parent-display-mode) |
| 3131 | display-mode))) | 3135 | display-mode))) |
| 3136 | (when current-line | ||
| 3137 | (goto-line current-line temp-buffer-name)) | ||
| 3132 | (message "Annotating... done"))) | 3138 | (message "Annotating... done"))) |
| 3133 | 3139 | ||
| 3134 | (defun vc-annotate-prev-version (prefix) | 3140 | (defun vc-annotate-prev-version (prefix) |