diff options
| author | Stefan Monnier | 2007-08-07 03:32:24 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-08-07 03:32:24 +0000 |
| commit | ebaac04d9128601085877463143b29a5934dec69 (patch) | |
| tree | 3d70e997d1439177696420a441dcc763fc7a8ac1 /lisp | |
| parent | cb8d3325626c766be67240cc6387ac61ba4b6115 (diff) | |
| download | emacs-ebaac04d9128601085877463143b29a5934dec69.tar.gz emacs-ebaac04d9128601085877463143b29a5934dec69.zip | |
(vc-annotate): Select temp-buffer before running vc-exec-after.
Select the buffer's window before moving point.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/vc.el | 19 |
2 files changed, 19 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5a64a298d1a..f8bf2d8f1be 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-08-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * vc.el (vc-annotate): Select temp-buffer before running vc-exec-after. | ||
| 4 | Select the buffer's window before moving point. | ||
| 5 | |||
| 1 | 2007-08-07 Richard Stallman <rms@gnu.org> | 6 | 2007-08-07 Richard Stallman <rms@gnu.org> |
| 2 | 7 | ||
| 3 | * term.el (term): Remove parent group `unix'. | 8 | * term.el (term): Remove parent group `unix'. |
| @@ -50,7 +55,7 @@ | |||
| 50 | 55 | ||
| 51 | * term.el: Honor term-default-fg-color and term-default-bg-color | 56 | * term.el: Honor term-default-fg-color and term-default-bg-color |
| 52 | settings when modifying term-current-face. | 57 | settings when modifying term-current-face. |
| 53 | (term-default-fg-color, term-default-bg-color): Initialized from | 58 | (term-default-fg-color, term-default-bg-color): Initialize from |
| 54 | default term-current-face. | 59 | default term-current-face. |
| 55 | (term-mode, term-reset-terminal): Set term-current-face with | 60 | (term-mode, term-reset-terminal): Set term-current-face with |
| 56 | term-default-fg-color and term-default-bg-color. | 61 | term-default-fg-color and term-default-bg-color. |
diff --git a/lisp/vc.el b/lisp/vc.el index 2b2dd9fb8c9..76253bdfd5b 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -3272,12 +3272,19 @@ colors. `vc-annotate-background' specifies the background color." | |||
| 3272 | (set (make-local-variable 'vc-annotate-parent-display-mode) | 3272 | (set (make-local-variable 'vc-annotate-parent-display-mode) |
| 3273 | display-mode))) | 3273 | display-mode))) |
| 3274 | 3274 | ||
| 3275 | (vc-exec-after | 3275 | (with-current-buffer temp-buffer-name |
| 3276 | `(progn | 3276 | (vc-exec-after |
| 3277 | (when ,current-line | 3277 | `(progn |
| 3278 | (goto-line ,current-line ,temp-buffer-name)) | 3278 | ;; Ideally, we'd rather not move point if the user has already |
| 3279 | (unless (active-minibuffer-window) | 3279 | ;; moved it elsewhere, but really point here is not the position |
| 3280 | (message "Annotating... done")))))) | 3280 | ;; of the user's cursor :-( |
| 3281 | (when ,current-line ;(and (bobp)) | ||
| 3282 | (let ((win (get-buffer-window (current-buffer) 0))) | ||
| 3283 | (when win | ||
| 3284 | (with-selected-window win | ||
| 3285 | (goto-line ,current-line))))) | ||
| 3286 | (unless (active-minibuffer-window) | ||
| 3287 | (message "Annotating... done"))))))) | ||
| 3281 | 3288 | ||
| 3282 | (defun vc-annotate-prev-version (prefix) | 3289 | (defun vc-annotate-prev-version (prefix) |
| 3283 | "Visit the annotation of the version previous to this one. | 3290 | "Visit the annotation of the version previous to this one. |