;ELC ;;; Compiled by mwolson@grepfind.mwolson.org on Thu Jan 24 00:15:29 2008 ;;; from file /stuff/proj/emacs/dvc/mwolson/lisp/dvc-annotate.el ;;; in Emacs version 23.0.50.2 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`dvc-annotate.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defalias 'dvc-annotate-current-time 'dvc-default-annotate-current-time) #@63 Determine whether we are on a tty that uses 8 or less colors. (defalias 'dvc-annotate-8color-tty-p '(macro . #[nil "\300\301!\203\302\207\300\303!\205\300\304!\205\305\207" [fboundp tty-display-color-p (and (tty-display-color-p) (<= (display-color-cells) 8)) display-color-p device-or-frame-type (and (display-color-p) (eq (device-or-frame-type (frame-device)) 'tty))] 2 (#$ . 675)])) #@59 Return a list of colors, each element of which is a list. (defalias 'dvc-annotate-tty-color-alist '(macro . #[nil "\300\301!\203\302\207\300\303!\205\304\207" [fboundp tty-color-alist (tty-color-alist) tty-color-list (mapcar #'list (tty-color-list))] 2 (#$ . 1072)])) #@307 Association list of age versus color, for \[dvc-annotate]. Ages are given in units of fractional days. Default is eighteen steps using a twenty day increment, from red to blue. For TTY displays with 8 or fewer colors, the default is red to blue with all other colors between (excluding black and white). (custom-declare-variable 'dvc-annotate-color-map '(if (dvc-annotate-8color-tty-p) (let* ((colors (sort (delq nil (mapcar (lambda (x) (if (not (or (string-equal (car x) "white") (string-equal (car x) "black"))) (car x))) (dvc-annotate-tty-color-alist))) (lambda (a b) (cond ((or (string-equal a "red") (string-equal b "blue")) t) ((or (string-equal b "red") (string-equal a "blue")) nil) ((string-equal a "yellow") t) ((string-equal b "yellow") nil) ((string-equal a "cyan") t) ((string-equal b "cyan") nil) ((string-equal a "green") t) ((string-equal b "green") nil) ((string-equal a "magenta") t) ((string-equal b "magenta") nil) (t (string< a b)))))) (date 20) (delta (/ (- 360 date) (1- (length colors))))) (mapcar (lambda (x) (prog1 (cons date x) (setq date (+ date delta)))) colors)) '((20 . "#FF3F3F") (40 . "#FF6C3F") (60 . "#FF993F") (80 . "#FFC63F") (100 . "#FFF33F") (120 . "#DDFF3F") (140 . "#B0FF3F") (160 . "#83FF3F") (180 . "#56FF3F") (200 . "#3FFF56") (220 . "#3FFF83") (240 . "#3FFFB0") (260 . "#3FFFDD") (280 . "#3FF3FF") (300 . "#3FC6FF") (320 . "#3F99FF") (340 . "#3F6CFF") (360 . "#3F3FFF"))) '(#$ . 1351) :type 'alist :group 'dvc) #@73 Color for lines older than the current color range in \[dvc-annotate]]. (custom-declare-variable 'dvc-annotate-very-old-color '"#3F3FFF" '(#$ . 2815) :type 'string :group 'dvc) #@69 Background color for \[dvc-annotate]. Default color is used if nil. (custom-declare-variable 'dvc-annotate-background '"black" '(#$ . 2998) :type 'string :group 'dvc) #@119 Other face attribute for faces used in dvc annotation. Specify them as alist of (attribute . value) or nil to ignore. (custom-declare-variable 'dvc-annotate-face-misc-attribute ''((:weight . bold)) '(#$ . 3172) :type 'string :group 'dvc) #@42 Return the oldest time in the COLOR-MAP. (defalias 'dvc-annotate-oldest-in-map #[(color-map) "\302!\211@@)\207" [color-map x last] 3 (#$ . 3416)]) #@267 Highlight the output of \[dvc-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. (defalias 'dvc-annotate-display-autoscale #[(&optional full) "\306\307\310\311 !\312\313\314!\210\212eb\210\315 \316y\210\211\2030 V\203%\nW\203\202)\317\f\203: \202; \nZ\320 !\245\f\205F \"\210\313\321\f\203Z\322\323 \nZ Z#\202`\322\324 \nZ\"\",\207" [date current oldest newest full dvc-annotate-color-map 0.0 999999 dvc-annotate-convert-time current-time nil message "Redisplaying annotation..." dvc-annotate-time 1 dvc-annotate-display dvc-annotate-oldest-in-map "Redisplaying annotation...done (%s)" format "Spanned from %.1f to %.1f days old" "Spanned to %.1f days old"] 7 (#$ . 3572) "P"]) #@156 Test successive cons cells of A-LIST against THRESHOLD. Return the first cons cell with a car that is not less than THRESHOLD, nil if no such cell exists. (defalias 'dvc-annotate-compcar #[(threshold a-list) "\304@ \203 @ W\203\n\233@\nT\202 *\207" [a-list tmp-cons i threshold 1] 2 (#$ . 4465)]) #@191 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. (defalias 'dvc-annotate-convert-time #[(time) "\302@!\303\304\305\"_\211A@)\\\306\245\207" [time x float lsh 1 16 86400] 5 (#$ . 4781)]) #@206 Return the time span in days to the next annotation. This calls the backend function annotate-time, and returns the difference in days between the time returned and the current time, or OFFSET if present. (defalias 'dvc-annotate-difference #[(&optional offset) "\302 \211\205 \206 \303 Z)\207" [next-time offset dvc-annotate-time dvc-annotate-current-time] 3 (#$ . 5118)]) #@54 Return the current time, encoded as fractional days. (defalias 'dvc-default-annotate-current-time #[nil "\300\301 !\207" [dvc-annotate-convert-time current-time] 2 (#$ . 5502)]) (byte-code "\301B\302\301!\204\303\301\304\"\210\304\207" [current-load-list dvc-annotate-offset default-boundp set-default nil] 3) #@211 Highlight `dvc-annotate' output in the current buffer. RATIO, is the expansion that should be applied to `dvc-annotate-color-map'. The annotations are relative to the current time, unless overridden by OFFSET. (defalias 'dvc-annotate-display #[(ratio &optional offset) "\304U\204\305\301!\210\306\307 \"\305\303!\210\n\310\311!\207" [ratio dvc-annotate-color-map offset dvc-annotate-offset 1.0 make-local-variable mapcar #[(elem) "@ _AB\207" [elem ratio] 2] font-lock-mode 1] 3 (#$ . 5823)]) (defalias 'dvc-annotate-lines #[(limit) "\306` W\203\230\307\n!\211\203\230\310 \"\206\306\fB\311 A\312\313O\314\230\203. A\313\306O\2020 AP\315!\206\203\316\317!!\320 A\"\210\203U\321\"\210\203\200\306\211\203@\322\306@A$\210A\211\204e*)`\313y\210\323`\324$\210,\202)\306\207" [difference limit dvc-annotate-offset dvc-annotate-color-map dvc-annotate-very-old-color color nil dvc-annotate-difference dvc-annotate-compcar "dvc-annotate-face-" 0 1 "#" intern-soft make-face intern set-face-foreground set-face-background set-face-attribute put-text-property face face-name tmp-face dvc-annotate-background dvc-annotate-face-misc-attribute attr #1=#:--cl-dolist-temp-- point] 6]) (defalias 'dvc-annotate-time #[nil "\300\301!\207" [dvc-call "dvc-annotate-time"] 2]) (provide 'dvc-annotate)