(Vtruncate_partial_width_windows): Improve docstring.
[bpt/emacs.git] / lisp / vc-annotate.el
index 63a99f1..22ff3da 100644 (file)
@@ -1,7 +1,7 @@
 ;;; vc-annotate.el --- VC Annotate Support
 
 ;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-;;   2007, 2008 Free Software Foundation, Inc.
+;;   2007, 2008, 2009 Free Software Foundation, Inc.
 
 ;; Author:     Martin Lorentzson  <emwson@emw.ericsson.se>
 ;; Maintainer: FSF
@@ -23,7 +23,7 @@
 ;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
-;; 
+;;
 
 (require 'vc-hooks)
 (require 'vc)
@@ -100,7 +100,7 @@ all other colors between (excluding black and white)."
   :group 'vc)
 
 (defcustom vc-annotate-very-old-color "#3F3FFF"
-  "Color for lines older than the current color range in \\[vc-annotate]]."
+  "Color for lines older than the current color range in \\[vc-annotate]."
   :type 'string
   :group 'vc)
 
@@ -276,6 +276,7 @@ cover the range from the oldest annotation to the newest."
      :help "Visit the annotation of the revision before the revision at line"]
     ["Annotate latest revision" vc-annotate-working-revision
      :help "Visit the annotation of the working revision of this file"]
+    "--"
     ["Show log of revision at line" vc-annotate-show-log-revision-at-line
      :help "Visit the log of the revision at line"]
     ["Show diff of revision at line" vc-annotate-show-diff-revision-at-line
@@ -361,7 +362,10 @@ mode-specific menu.  `vc-annotate-color-map' and
          ;; If BUF is specified, we presume the caller maintains current line,
          ;; so we don't need to do it here.  This implementation may give
          ;; strange results occasionally in the case of REV != WORKFILE-REV.
-         (current-line (or move-point-to (unless buf (line-number-at-pos)))))
+         (current-line (or move-point-to (unless buf
+                                          (save-restriction
+                                            (widen)
+                                            (line-number-at-pos))))))
     (message "Annotating...")
     ;; If BUF is specified it tells in which buffer we should put the
     ;; annotations.  This is used when switching annotations to another
@@ -511,12 +515,11 @@ revisions after."
 (defun vc-annotate-warp-revision (revspec)
   "Annotate the revision described by REVSPEC.
 
-If REVSPEC is a positive integer, warp that many revisions
-forward, if possible, otherwise echo a warning message.  If
-REVSPEC is a negative integer, warp that many revisions backward,
+If REVSPEC is a positive integer, warp that many revisions forward,
 if possible, otherwise echo a warning message.  If REVSPEC is a
-string, then it describes a revision number, so warp to that
-revision."
+negative integer, warp that many revisions backward, if possible,
+otherwise echo a warning message.  If REVSPEC is a string, then it
+describes a revision number, so warp to that revision."
   (if (not (equal major-mode 'vc-annotate-mode))
       (message "Cannot be invoked outside of a vc annotate buffer")
     (let* ((buf (current-buffer))
@@ -590,7 +593,7 @@ or OFFSET if present."
 
 (defun vc-annotate-display (ratio &optional offset)
   "Highlight `vc-annotate' output in the current buffer.
-RATIO, is the expansion that should be applied to `vc-annotate-color-map'.
+RATIO is the expansion that should be applied to `vc-annotate-color-map'.
 The annotations are relative to the current time, unless overridden by OFFSET."
   (when (/= ratio 1.0)
     (set (make-local-variable 'vc-annotate-color-map)