aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2008-02-16 15:54:37 +0000
committerDan Nicolaescu2008-02-16 15:54:37 +0000
commitbae9f9e311d370f625e442fecfe7d23d2ced2cf3 (patch)
treeb37522ba2b9f9c026e051463d508ab567de3ce68
parent8a7619baf36a5b9ebd0375848e62c08efb3c438e (diff)
downloademacs-bae9f9e311d370f625e442fecfe7d23d2ced2cf3.tar.gz
emacs-bae9f9e311d370f625e442fecfe7d23d2ced2cf3.zip
(vc-annotate): Add new argument.
(vc-annotate-warp-revision): Pass the current line to vc-annotate.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/vc.el16
2 files changed, 13 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 073fdee2815..2509add2580 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12008-02-16 Dan Nicolaescu <dann@ics.uci.edu> 12008-02-16 Dan Nicolaescu <dann@ics.uci.edu>
2 2
3 * vc.el (vc-annotate): Add new argument.
4 (vc-annotate-warp-revision): Pass the current line to vc-annotate.
5
3 * progmodes/hideshow.el: Remove the minor-mode bookkeeping. Move 6 * progmodes/hideshow.el: Remove the minor-mode bookkeeping. Move
4 make-variable-buffer-local code after the corresponding defvar. 7 make-variable-buffer-local code after the corresponding defvar.
5 (hs-minor-mode-map): Define and initialize in one step. 8 (hs-minor-mode-map): Define and initialize in one step.
diff --git a/lisp/vc.el b/lisp/vc.el
index cb569adcfb8..0bfafd976f5 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -3684,7 +3684,7 @@ use; you may override this using the second optional arg MODE."
3684 vc-annotate-display-mode)))) 3684 vc-annotate-display-mode))))
3685 3685
3686;;;###autoload 3686;;;###autoload
3687(defun vc-annotate (file rev &optional display-mode buf) 3687(defun vc-annotate (file rev &optional display-mode buf move-point-to)
3688 "Display the edit history of the current file using colors. 3688 "Display the edit history of the current file using colors.
3689 3689
3690This command creates a buffer that shows, for each line of the current 3690This command creates a buffer that shows, for each line of the current
@@ -3703,6 +3703,8 @@ should cover. For example, a time span of 20 days means that changes
3703over the past 20 days are shown in red to blue, according to their 3703over the past 20 days are shown in red to blue, according to their
3704age, and everything that is older than that is shown in blue. 3704age, and everything that is older than that is shown in blue.
3705 3705
3706If MOVE-POINT-TO is given, move the point to that line.
3707
3706Customization variables: 3708Customization variables:
3707 3709
3708`vc-annotate-menu-elements' customizes the menu elements of the 3710`vc-annotate-menu-elements' customizes the menu elements of the
@@ -3730,7 +3732,7 @@ mode-specific menu. `vc-annotate-color-map' and
3730 ;; If BUF is specified, we presume the caller maintains current line, 3732 ;; If BUF is specified, we presume the caller maintains current line,
3731 ;; so we don't need to do it here. This implementation may give 3733 ;; so we don't need to do it here. This implementation may give
3732 ;; strange results occasionally in the case of REV != WORKFILE-REV. 3734 ;; strange results occasionally in the case of REV != WORKFILE-REV.
3733 (current-line (unless buf (line-number-at-pos)))) 3735 (current-line (or move-point-to (unless buf (line-number-at-pos)))))
3734 (message "Annotating...") 3736 (message "Annotating...")
3735 ;; If BUF is specified it tells in which buffer we should put the 3737 ;; If BUF is specified it tells in which buffer we should put the
3736 ;; annotations. This is used when switching annotations to another 3738 ;; annotations. This is used when switching annotations to another
@@ -3898,10 +3900,12 @@ revision."
3898 (when newrev 3900 (when newrev
3899 (vc-annotate vc-annotate-parent-file newrev 3901 (vc-annotate vc-annotate-parent-file newrev
3900 vc-annotate-parent-display-mode 3902 vc-annotate-parent-display-mode
3901 buf) 3903 buf
3902 (goto-line (min oldline (progn (goto-char (point-max)) 3904 ;; Pass the current line so that vc-annotate will
3903 (forward-line -1) 3905 ;; place the point in the line.
3904 (line-number-at-pos))) buf))))) 3906 (min oldline (progn (goto-char (point-max))
3907 (forward-line -1)
3908 (line-number-at-pos))))))))
3905 3909
3906(defun vc-annotate-compcar (threshold a-list) 3910(defun vc-annotate-compcar (threshold a-list)
3907 "Test successive cons cells of A-LIST against THRESHOLD. 3911 "Test successive cons cells of A-LIST against THRESHOLD.