X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/d8e9122115b5ffcec342c841b81cb2d2b8217e4b..0e963201d03d9229bb8ac4323291d2b0119526ed:/lisp/vc/vc-annotate.el diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el index 8bcea5f164..ed038f1d4e 100644 --- a/lisp/vc/vc-annotate.el +++ b/lisp/vc/vc-annotate.el @@ -1,6 +1,6 @@ ;;; vc-annotate.el --- VC Annotate Support -*- lexical-binding: t -*- -;; Copyright (C) 1997-1998, 2000-2015 Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2000-2016 Free Software Foundation, Inc. ;; Author: Martin Lorentzson ;; Maintainer: emacs-devel@gnu.org @@ -175,7 +175,6 @@ List of factors, used to expand/compress the time scale. See `vc-annotate'." (define-key m "p" 'vc-annotate-prev-revision) (define-key m "w" 'vc-annotate-working-revision) (define-key m "v" 'vc-annotate-toggle-annotation-visibility) - (define-key m "v" 'vc-annotate-toggle-annotation-visibility) (define-key m "\C-m" 'vc-annotate-goto-line) m) "Local keymap used for VC-Annotate mode.") @@ -270,7 +269,7 @@ cover the range from the oldest annotation to the newest." (/ (- (if full newest current) oldest) (vc-annotate-oldest-in-map vc-annotate-color-map)) (if full newest)) - (message "Redisplaying annotation...done \(%s\)" + (message "Redisplaying annotation...done (%s)" (if full (format "Spanned from %.1f to %.1f days old" (- current oldest) @@ -583,17 +582,15 @@ the file in question, search for the log entry required and move point." (setq prev-rev (vc-call-backend vc-annotate-backend 'previous-revision (if filediff fname nil) rev)) - (if (not prev-rev) - (message "Cannot diff from any revision prior to %s" rev) - (vc-diff-internal - t - ;; The value passed here should follow what - ;; `vc-deduce-fileset' returns. - (list vc-annotate-backend - (if filediff - (list fname) - nil)) - prev-rev rev)))))) + (vc-diff-internal + t + ;; The value passed here should follow what + ;; `vc-deduce-fileset' returns. + (list vc-annotate-backend + (if filediff + (list fname) + nil)) + prev-rev rev))))) (defun vc-annotate-show-diff-revision-at-line () "Visit the diff of the revision at line from its previous revision." @@ -605,7 +602,10 @@ the file in question, search for the log entry required and move point." (interactive) (when (eq 'file (vc-call-backend vc-annotate-backend 'revision-granularity)) (error "The %s backend does not support changeset diffs" vc-annotate-backend)) - (vc-annotate-show-diff-revision-at-line-internal nil)) + ;; Make sure `diff-goto-source' will be able to find all files. + (let ((default-directory (vc-call-backend vc-annotate-backend + 'root default-directory))) + (vc-annotate-show-diff-revision-at-line-internal nil))) (defun vc-annotate-warp-revision (revspec &optional file) "Annotate the revision described by REVSPEC.