From: Stefan Monnier Date: Tue, 10 Apr 2012 20:08:43 +0000 (-0400) Subject: * lisp/vc/vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal): X-Git-Tag: emacs-24.2.90~471^2~365^2~3 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1930bf5dc38950d05a26bbb1118a4602694acfba;p=emacs.git * lisp/vc/vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal): Use derived-mode-p. Run the diff asynchronously. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7fee942d255..bb3e68161cc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-04-10 Stefan Monnier + + * 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 * obsolete/mouse-sel.el: Add an Obsolete-since header. @@ -10,13 +15,13 @@ 2012-04-10 Nathan Weizenbaum - * 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 (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 (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). diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el index a1dd807d828..f4964ef85cc 100644 --- a/lisp/vc/vc-annotate.el +++ b/lisp/vc/vc-annotate.el @@ -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."