aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2008-02-14 07:37:51 +0000
committerDan Nicolaescu2008-02-14 07:37:51 +0000
commitf3ff0fe9acc03f05f6077cf075eb27aedd101210 (patch)
tree29920ba358d297ec32a4f53ac79ebf1fca78e223
parentb2928357743da1d7cfeca300d64e29c15b84683f (diff)
downloademacs-f3ff0fe9acc03f05f6077cf075eb27aedd101210.tar.gz
emacs-f3ff0fe9acc03f05f6077cf075eb27aedd101210.zip
(vc-annotate-find-revision-at-line): New function.
(vc-annotate-mode-map): Bind it. (vc-annotate-mode-menu): Add a menu entry for it. Add :help for some entries.
-rw-r--r--etc/NEWS3
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/vc.el44
3 files changed, 46 insertions, 8 deletions
diff --git a/etc/NEWS b/etc/NEWS
index f54c35e60fe..30e73015232 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -348,6 +348,9 @@ as a single changeset.
348 348
349*** In VC Annotate mode, you can type V to toggle the annotation visibility. 349*** In VC Annotate mode, you can type V to toggle the annotation visibility.
350 350
351*** In VC Annotate mode, you can type f to show the file revision on
352the current line.
353
351** log-edit now has a command bound to C-c C-d to show the diff for 354** log-edit now has a command bound to C-c C-d to show the diff for
352the files involved. 355the files involved.
353 356
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8b021691397..a7a873a74bb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12008-02-14 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * vc.el (vc-annotate-find-revision-at-line): New function.
4 (vc-annotate-mode-map): Bind it.
5 (vc-annotate-mode-menu): Add a menu entry for it. Add :help for
6 some entries.
7
12008-02-14 Glenn Morris <rgm@gnu.org> 82008-02-14 Glenn Morris <rgm@gnu.org>
2 9
3 * Makefile.in (custom-deps, finder-data, autoloads, recompile): 10 * Makefile.in (custom-deps, finder-data, autoloads, recompile):
diff --git a/lisp/vc.el b/lisp/vc.el
index e1e61171108..cb569adcfb8 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -820,6 +820,7 @@ List of factors, used to expand/compress the time scale. See `vc-annotate'."
820 (let ((m (make-sparse-keymap))) 820 (let ((m (make-sparse-keymap)))
821 (define-key m "A" 'vc-annotate-revision-previous-to-line) 821 (define-key m "A" 'vc-annotate-revision-previous-to-line)
822 (define-key m "D" 'vc-annotate-show-diff-revision-at-line) 822 (define-key m "D" 'vc-annotate-show-diff-revision-at-line)
823 (define-key m "f" 'vc-annotate-find-revision-at-line)
823 (define-key m "J" 'vc-annotate-revision-at-line) 824 (define-key m "J" 'vc-annotate-revision-at-line)
824 (define-key m "L" 'vc-annotate-show-log-revision-at-line) 825 (define-key m "L" 'vc-annotate-show-log-revision-at-line)
825 (define-key m "N" 'vc-annotate-next-revision) 826 (define-key m "N" 'vc-annotate-next-revision)
@@ -3624,22 +3625,39 @@ cover the range from the oldest annotation to the newest."
3624 ["Span to Oldest" 3625 ["Span to Oldest"
3625 (unless (eq vc-annotate-display-mode 'scale) 3626 (unless (eq vc-annotate-display-mode 'scale)
3626 (vc-annotate-display-select nil 'scale)) 3627 (vc-annotate-display-select nil 'scale))
3628 :help
3629 "Use an autoscaled color map from the oldest annotation to the current time"
3627 :style toggle :selected 3630 :style toggle :selected
3628 (eq vc-annotate-display-mode 'scale)] 3631 (eq vc-annotate-display-mode 'scale)]
3629 ["Span Oldest->Newest" 3632 ["Span Oldest->Newest"
3630 (unless (eq vc-annotate-display-mode 'fullscale) 3633 (unless (eq vc-annotate-display-mode 'fullscale)
3631 (vc-annotate-display-select nil 'fullscale)) 3634 (vc-annotate-display-select nil 'fullscale))
3635 :help
3636 "Use an autoscaled color map from the oldest to the newest annotation"
3632 :style toggle :selected 3637 :style toggle :selected
3633 (eq vc-annotate-display-mode 'fullscale)] 3638 (eq vc-annotate-display-mode 'fullscale)]
3634 "--" 3639 "--"
3635 ["Toggle annotation visibility" vc-annotate-toggle-annotation-visibility] 3640 ["Toggle annotation visibility" vc-annotate-toggle-annotation-visibility
3636 ["Annotate previous revision" vc-annotate-prev-revision] 3641 :help
3637 ["Annotate next revision" vc-annotate-next-revision] 3642 "Toggle whether the annotation is visible or not"]
3638 ["Annotate revision at line" vc-annotate-revision-at-line] 3643 ["Annotate previous revision" vc-annotate-prev-revision
3639 ["Annotate revision previous to line" vc-annotate-revision-previous-to-line] 3644 :help "Visit the annotation of the revision previous to this one"]
3640 ["Annotate latest revision" vc-annotate-working-revision] 3645 ["Annotate next revision" vc-annotate-next-revision
3641 ["Show log of revision at line" vc-annotate-show-log-revision-at-line] 3646 :help "Visit the annotation of the revision after this one"]
3642 ["Show diff of revision at line" vc-annotate-show-diff-revision-at-line])) 3647 ["Annotate revision at line" vc-annotate-revision-at-line
3648 :help
3649 "Visit the annotation of the revision identified in the current line"]
3650 ["Annotate revision previous to line" vc-annotate-revision-previous-to-line
3651 :help "Visit the annotation of the revision before the revision at line"]
3652 ["Annotate latest revision" vc-annotate-working-revision
3653 :help "Visit the annotation of the working revision of this file"]
3654 ["Show log of revision at line" vc-annotate-show-log-revision-at-line
3655 :help "Visit the log of the revision at line"]
3656 ["Show diff of revision at line" vc-annotate-show-diff-revision-at-line
3657 :help
3658 "Visit the diff of the revision at line from its previous revision"]
3659 ["Visit revision at line" vc-annotate-find-revision-at-line
3660 :help "Visit the revision identified in the current line"]))
3643 3661
3644(defun vc-annotate-display-select (&optional buffer mode) 3662(defun vc-annotate-display-select (&optional buffer mode)
3645 "Highlight the output of \\[vc-annotate]. 3663 "Highlight the output of \\[vc-annotate].
@@ -3790,6 +3808,16 @@ revisions after."
3790 (message "Already at revision %s" rev-at-line) 3808 (message "Already at revision %s" rev-at-line)
3791 (vc-annotate-warp-revision rev-at-line)))))) 3809 (vc-annotate-warp-revision rev-at-line))))))
3792 3810
3811(defun vc-annotate-find-revision-at-line ()
3812 "Visit the revision identified in the current line."
3813 (interactive)
3814 (if (not (equal major-mode 'vc-annotate-mode))
3815 (message "Cannot be invoked outside of a vc annotate buffer")
3816 (let ((rev-at-line (vc-annotate-extract-revision-at-line)))
3817 (if (not rev-at-line)
3818 (message "Cannot extract revision number from the current line")
3819 (vc-revision-other-window rev-at-line)))))
3820
3793(defun vc-annotate-revision-previous-to-line () 3821(defun vc-annotate-revision-previous-to-line ()
3794 "Visit the annotation of the revision before the revision at line." 3822 "Visit the annotation of the revision before the revision at line."
3795 (interactive) 3823 (interactive)