2896 |
(defun vc-annotate-display-autoscale (&optional full) |
(defun vc-annotate-display-autoscale (&optional full) |
2897 |
"Highlight the output of \\[vc-annotate] using an autoscaled color map. |
"Highlight the output of \\[vc-annotate] using an autoscaled color map. |
2898 |
Autoscaling means that the map is scaled from the current time to the |
Autoscaling means that the map is scaled from the current time to the |
2899 |
oldest annotation in the buffer, or, with argument FULL non-nil, to |
oldest annotation in the buffer, or, with prefix argument FULL, to |
2900 |
cover the range from the oldest annotation to the newest." |
cover the range from the oldest annotation to the newest." |
2901 |
(interactive) |
(interactive "P") |
2902 |
(let ((newest 0.0) |
(let ((newest 0.0) |
2903 |
(oldest 999999.) ;Any CVS users at the founding of Rome? |
(oldest 999999.) ;Any CVS users at the founding of Rome? |
2904 |
(current (vc-annotate-convert-time (current-time))) |
(current (vc-annotate-convert-time (current-time))) |
2907 |
;; Run through this file and find the oldest and newest dates annotated. |
;; Run through this file and find the oldest and newest dates annotated. |
2908 |
(save-excursion |
(save-excursion |
2909 |
(goto-char (point-min)) |
(goto-char (point-min)) |
2910 |
(while (setq date (vc-call-backend vc-annotate-backend 'annotate-time)) |
(while (setq date (prog1 (vc-call-backend vc-annotate-backend |
2911 |
|
'annotate-time) |
2912 |
|
(forward-line 1))) |
2913 |
(if (> date newest) |
(if (> date newest) |
2914 |
(setq newest date)) |
(setq newest date)) |
2915 |
(if (< date oldest) |
(if (< date oldest) |