Function: vc-annotate-display-autoscale

vc-annotate-display-autoscale is an interactive and byte-compiled function defined in vc-annotate.el.gz.

Signature

(vc-annotate-display-autoscale &optional FULL)

Documentation

Highlight the output of C-x v g (vc-annotate) using an autoscaled color map.

Autoscaling means that the map is scaled from the current time to the oldest annotation in the buffer, or, with prefix argument FULL, to cover the range from the oldest annotation to the newest.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/vc/vc-annotate.el.gz
(defun vc-annotate-display-autoscale (&optional full)
  "Highlight the output of \\[vc-annotate] using an autoscaled color map.
Autoscaling means that the map is scaled from the current time to the
oldest annotation in the buffer, or, with prefix argument FULL, to
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))
	date)
    (message "Redisplaying annotation...")
    ;; Run through this file and find the oldest and newest dates annotated.
    (save-excursion
      (goto-char (point-min))
      (while (not (eobp))
        (when (setq date (vc-annotate-get-time-set-line-props))
          (when (> date newest)
	    (setq newest date))
          (when (< date oldest)
	    (setq oldest date)))
        (forward-line 1)))
    (vc-annotate-display
     (/ (- (if full newest current) oldest)
        (vc-annotate-oldest-in-map vc-annotate-color-map))
     (if full newest))
    (message "Redisplaying annotation...done (%s)"
	     (if full
		 (format "Spanned from %.1f to %.1f days old"
			 (- current oldest)
			 (- current newest))
	       (format "Spanned to %.1f days old" (- current oldest))))))