]> code.delx.au - gnu-emacs/blobdiff - lisp/vc/vc-annotate.el
Merge from emacs-24; up to 2012-04-26T03:04:36Z!cyd@gnu.org
[gnu-emacs] / lisp / vc / vc-annotate.el
index b6ecc4c1d750561c3df808b881ddf0fa41c61670..f4964ef85cc723f81139af8d8e63278f86f2849f 100644 (file)
@@ -1,6 +1,6 @@
 ;;; vc-annotate.el --- VC Annotate Support
 
-;; Copyright (C) 1997-1998, 2000-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2000-2012 Free Software Foundation, Inc.
 
 ;; Author:     Martin Lorentzson  <emwson@emw.ericsson.se>
 ;; Maintainer: FSF
@@ -522,12 +522,12 @@ the file in question, search for the log entry required and move point."
             (car rev-at-line) t 1)))))))
 
 (defun vc-annotate-show-diff-revision-at-line-internal (filediff)
-  (if (not (equal major-mode 'vc-annotate-mode))
+  (if (not (derived-mode-p 'vc-annotate-mode))
       (message "Cannot be invoked outside of a vc annotate buffer")
     (let* ((rev-at-line (vc-annotate-extract-revision-at-line))
-         (prev-rev nil)
-         (rev (car rev-at-line))
-         (fname (cdr rev-at-line)))
+           (prev-rev nil)
+           (rev (car rev-at-line))
+           (fname (cdr rev-at-line)))
       (if (not rev-at-line)
          (message "Cannot extract revision number from the current line")
        (setq prev-rev
@@ -535,17 +535,15 @@ the file in question, search for the log entry required and move point."
                                (if filediff fname nil) rev))
        (if (not prev-rev)
            (message "Cannot diff from any revision prior to %s" rev)
-         (save-window-excursion
-           (vc-diff-internal
-            nil
-            ;; The value passed here should follow what
-            ;; `vc-deduce-fileset' returns.
-            (list vc-annotate-backend
-                  (if filediff
-                      (list fname)
-                    nil))
-            prev-rev rev))
-         (switch-to-buffer "*vc-diff*"))))))
+          (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."