diff options
| author | Stefan Monnier | 2012-04-10 16:08:43 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-04-10 16:08:43 -0400 |
| commit | 1930bf5dc38950d05a26bbb1118a4602694acfba (patch) | |
| tree | 0f26df67529ee1cea075c9a2dbc6dc41f6f35ab7 | |
| parent | 6bbef4e552d1c3cbb08fc8b5224ebcaa663ff95a (diff) | |
| download | emacs-1930bf5dc38950d05a26bbb1118a4602694acfba.tar.gz emacs-1930bf5dc38950d05a26bbb1118a4602694acfba.zip | |
* lisp/vc/vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal):
Use derived-mode-p. Run the diff asynchronously.
| -rw-r--r-- | lisp/ChangeLog | 13 | ||||
| -rw-r--r-- | lisp/vc/vc-annotate.el | 28 |
2 files changed, 22 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7fee942d255..bb3e68161cc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-04-10 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * vc/vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal): | ||
| 4 | Use derived-mode-p. Run the diff asynchronously. | ||
| 5 | |||
| 1 | 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> | 6 | 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 7 | ||
| 3 | * obsolete/mouse-sel.el: Add an Obsolete-since header. | 8 | * obsolete/mouse-sel.el: Add an Obsolete-since header. |
| @@ -10,13 +15,13 @@ | |||
| 10 | 15 | ||
| 11 | 2012-04-10 Nathan Weizenbaum <nweiz@google.com> | 16 | 2012-04-10 Nathan Weizenbaum <nweiz@google.com> |
| 12 | 17 | ||
| 13 | * progmodes/python.el (python-fill-paragraph): Make | 18 | * progmodes/python.el (python-fill-paragraph): |
| 14 | python-fill-region in a multiline string work when font-lock is | 19 | Make python-fill-region in a multiline string work when font-lock is |
| 15 | disabled (bug#7018). | 20 | disabled (bug#7018). |
| 16 | 21 | ||
| 17 | 2012-04-10 Laimonas Vėbra <laimonas.vebra@gmail.com> (tiny change) | 22 | 2012-04-10 Laimonas Vėbra <laimonas.vebra@gmail.com> (tiny change) |
| 18 | 23 | ||
| 19 | * language/european.el (cp775): Added oem/legacy (en)coding on | 24 | * language/european.el (cp775): Add oem/legacy (en)coding on |
| 20 | DOS/MS Windows for the Baltic languages. There are still plenty of | 25 | DOS/MS Windows for the Baltic languages. There are still plenty of |
| 21 | texts written in this encoding/codepage (bug#6519). | 26 | texts written in this encoding/codepage (bug#6519). |
| 22 | 27 | ||
| @@ -27,7 +32,7 @@ | |||
| 27 | 32 | ||
| 28 | 2012-04-10 Florian Adamsky <florian@adamsky.it> (tiny change) | 33 | 2012-04-10 Florian Adamsky <florian@adamsky.it> (tiny change) |
| 29 | 34 | ||
| 30 | * recentf.el (recentf-dialog-mode-map): Added two keybindings for | 35 | * recentf.el (recentf-dialog-mode-map): Add two keybindings for |
| 31 | next-line "n" and previous-line "p" in order to make recentf more | 36 | next-line "n" and previous-line "p" in order to make recentf more |
| 32 | consistent with ibuffer, dired or org-mode (bug#9387). | 37 | consistent with ibuffer, dired or org-mode (bug#9387). |
| 33 | 38 | ||
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." | |||
| 522 | (car rev-at-line) t 1))))))) | 522 | (car rev-at-line) t 1))))))) |
| 523 | 523 | ||
| 524 | (defun vc-annotate-show-diff-revision-at-line-internal (filediff) | 524 | (defun vc-annotate-show-diff-revision-at-line-internal (filediff) |
| 525 | (if (not (equal major-mode 'vc-annotate-mode)) | 525 | (if (not (derived-mode-p 'vc-annotate-mode)) |
| 526 | (message "Cannot be invoked outside of a vc annotate buffer") | 526 | (message "Cannot be invoked outside of a vc annotate buffer") |
| 527 | (let* ((rev-at-line (vc-annotate-extract-revision-at-line)) | 527 | (let* ((rev-at-line (vc-annotate-extract-revision-at-line)) |
| 528 | (prev-rev nil) | 528 | (prev-rev nil) |
| 529 | (rev (car rev-at-line)) | 529 | (rev (car rev-at-line)) |
| 530 | (fname (cdr rev-at-line))) | 530 | (fname (cdr rev-at-line))) |
| 531 | (if (not rev-at-line) | 531 | (if (not rev-at-line) |
| 532 | (message "Cannot extract revision number from the current line") | 532 | (message "Cannot extract revision number from the current line") |
| 533 | (setq prev-rev | 533 | (setq prev-rev |
| @@ -535,17 +535,15 @@ the file in question, search for the log entry required and move point." | |||
| 535 | (if filediff fname nil) rev)) | 535 | (if filediff fname nil) rev)) |
| 536 | (if (not prev-rev) | 536 | (if (not prev-rev) |
| 537 | (message "Cannot diff from any revision prior to %s" rev) | 537 | (message "Cannot diff from any revision prior to %s" rev) |
| 538 | (save-window-excursion | 538 | (vc-diff-internal |
| 539 | (vc-diff-internal | 539 | t |
| 540 | nil | 540 | ;; The value passed here should follow what |
| 541 | ;; The value passed here should follow what | 541 | ;; `vc-deduce-fileset' returns. |
| 542 | ;; `vc-deduce-fileset' returns. | 542 | (list vc-annotate-backend |
| 543 | (list vc-annotate-backend | 543 | (if filediff |
| 544 | (if filediff | 544 | (list fname) |
| 545 | (list fname) | 545 | nil)) |
| 546 | nil)) | 546 | prev-rev rev)))))) |
| 547 | prev-rev rev)) | ||
| 548 | (switch-to-buffer "*vc-diff*")))))) | ||
| 549 | 547 | ||
| 550 | (defun vc-annotate-show-diff-revision-at-line () | 548 | (defun vc-annotate-show-diff-revision-at-line () |
| 551 | "Visit the diff of the revision at line from its previous revision." | 549 | "Visit the diff of the revision at line from its previous revision." |