]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/vc/vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal):
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 10 Apr 2012 20:08:43 +0000 (16:08 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 10 Apr 2012 20:08:43 +0000 (16:08 -0400)
Use derived-mode-p.  Run the diff asynchronously.

lisp/ChangeLog
lisp/vc/vc-annotate.el

index 7fee942d255c70e0be5893d84d305cc15850d864..bb3e68161ccf725af6d35486b54b83a24bd14808 100644 (file)
@@ -1,3 +1,8 @@
+2012-04-10  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * vc/vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal):
+       Use derived-mode-p.  Run the diff asynchronously.
+
 2012-04-10  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * obsolete/mouse-sel.el: Add an Obsolete-since header.
 
 2012-04-10  Nathan Weizenbaum  <nweiz@google.com>
 
-       * progmodes/python.el (python-fill-paragraph): Make
-       python-fill-region in a multiline string work when font-lock is
+       * progmodes/python.el (python-fill-paragraph):
+       Make python-fill-region in a multiline string work when font-lock is
        disabled (bug#7018).
 
 2012-04-10  Laimonas VÄ—bra  <laimonas.vebra@gmail.com>  (tiny change)
 
-       * language/european.el (cp775): Added oem/legacy (en)coding on
+       * language/european.el (cp775): Add oem/legacy (en)coding on
        DOS/MS Windows for the Baltic languages. There are still plenty of
        texts written in this encoding/codepage (bug#6519).
 
@@ -27,7 +32,7 @@
 
 2012-04-10  Florian Adamsky  <florian@adamsky.it>  (tiny change)
 
-       * recentf.el (recentf-dialog-mode-map): Added two keybindings for
+       * recentf.el (recentf-dialog-mode-map): Add two keybindings for
        next-line "n" and previous-line "p" in order to make recentf more
        consistent with ibuffer, dired or org-mode (bug#9387).
 
index a1dd807d828ed4f89f302738b517ab71413d67e2..f4964ef85cc723f81139af8d8e63278f86f2849f 100644 (file)
@@ -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."