]> code.delx.au - gnu-emacs/blobdiff - lisp/vc/vc-annotate.el
Update copyright year to 2015
[gnu-emacs] / lisp / vc / vc-annotate.el
index 580e7727a06b946dda1f76c28ebb4acddc8d5318..8bcea5f164dbf178d4658d7c17adf24d4f5dcef7 100644 (file)
@@ -1,6 +1,6 @@
 ;;; vc-annotate.el --- VC Annotate Support  -*- lexical-binding: t -*-
 
-;; Copyright (C) 1997-1998, 2000-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2000-2015 Free Software Foundation, Inc.
 
 ;; Author:     Martin Lorentzson  <emwson@emw.ericsson.se>
 ;; Maintainer: emacs-devel@gnu.org
@@ -253,7 +253,7 @@ cover the range from the oldest annotation to the newest."
   (interactive "P")
   (let ((newest 0.0)
        (oldest 999999.)                ;Any CVS users at the founding of Rome?
-       (current (vc-annotate-convert-time (current-time)))
+       (current (vc-annotate-convert-time))
        date)
     (message "Redisplaying annotation...")
     ;; Run through this file and find the oldest and newest dates annotated.
@@ -664,11 +664,10 @@ nil if no such cell exists."
      (setq i (+ i 1)))
    tmp-cons))                          ; Return the appropriate value
 
-(defun vc-annotate-convert-time (time)
-  "Convert a time value to a floating-point number of days.
-The argument TIME is a list as returned by `current-time' or
-`encode-time', only the first two elements of that list are considered."
-  (/ (+ (* (float (car time)) (lsh 1 16)) (cadr time)) 24 3600))
+(defun vc-annotate-convert-time (&optional time)
+  "Convert optional value TIME to a floating-point number of days.
+TIME defaults to the current time."
+  (/ (float-time time) 86400))
 
 (defun vc-annotate-difference (&optional offset)
   "Return the time span in days to the next annotation.
@@ -683,7 +682,7 @@ or OFFSET if present."
 
 (defun vc-default-annotate-current-time (_backend)
   "Return the current time, encoded as fractional days."
-  (vc-annotate-convert-time (current-time)))
+  (vc-annotate-convert-time))
 
 (defvar vc-annotate-offset nil)