Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 3493a9c6b1
Fetching contributors…

Cannot retrieve contributors at this time

136 lines (122 sloc) 12.1 KB
;;; Compiled by on Fri Feb 19 15:40:02 2010
;;; from file /home/eli/EliEmacs/extras/git-blame.el
;;; in Emacs version 23.1.1
;;; 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 "`git-blame.el' was compiled for Emacs 19.29 or later"))
(byte-code "\300\301!\210\302\303\304\305\306\307%\210\310\307\311\312\306\313\314\315&\207" [require format-spec custom-declare-face git-blame-prefix-face ((((background dark)) (:foreground "gray" :background "black")) (((background light)) (:foreground "gray" :background "white")) (t (:weight bold))) "The face used for the hash prefix." :group git-blame custom-declare-group nil "A minor mode showing Git blame information." git :link (function-link git-blame-mode)] 8)
#@53 Use colors to indicate commits in `git-blame-mode'.
(custom-declare-variable 'git-blame-use-colors 't '(#$ . 1054) :type 'boolean :group 'git-blame)
#@313 The format of the prefix added to each line in `git-blame'
mode. The format is passed to `format-spec' with the following format keys:
%h - the abbreviated hash
%H - the full hash
%a - the author name
%A - the author email
%c - the committer name
%C - the committer email
%s - the commit summary

(custom-declare-variable 'git-blame-prefix-format '"%h %20A:" '(#$ . 1210) :group 'git-blame)
#@336 The format of the description shown when pointing at a line in
`git-blame' mode. The format string is passed to `format-spec'
with the following format keys:
%h - the abbreviated hash
%H - the full hash
%a - the author name
%A - the author email
%c - the committer name
%C - the committer email
%s - the commit summary

(custom-declare-variable 'git-blame-mouseover-format '"%h %a %A: %s" '(#$ . 1623) :group 'git-blame)
#@120 Given a list, returns a list of triples formed with each
elements of the list.
a b => bbb bba bab baa abb aba aaa aab
(defalias 'git-blame-color-scale #[(&rest elements) "\306 \306\211\203J @ \306\211\203B @ \306 \211\n\203:\n@ \307\310\n\f $B\nA\211\n\204\"* A\211\204* A\211\204\n*)\207" [result elements a #1=#:--cl-dolist-temp-- b #2=#:--cl-dolist-temp-- nil format "#%s%s%s" c #3=#:--cl-dolist-temp--] 8 (#$ . 2066)])
#@85 Select a random element from L and returns it. Also remove
selected element from l.
(defalias 'git-blame-random-pop '(macro . #[(l) "\301\302\303\304\305DDEDC\306\307\302EE\310BBB\207" [l let e elt random length setq remove (e)] 7 (#$ . 2522)]))
#@196 *Formatting option used for describing current line in the minibuffer.
This option is used to pass to git log --pretty= command-line option,
and describe which commit the current line was made.
(defvar git-blame-log-oneline-format "format:[%cr] %cn: %s" (#$ . -2779))
#@139 *List of colors (format #RGB) to use in a dark environment.
To check out the list, evaluate (list-colors-display git-blame-dark-colors).
(defvar git-blame-dark-colors (git-blame-color-scale "0c" "04" "24" "1c" "2c" "34" "14" "3c") (#$ . -3055))
#@141 *List of colors (format #RGB) to use in a light environment.
To check out the list, evaluate (list-colors-display git-blame-light-colors).
(defvar git-blame-light-colors (git-blame-color-scale "c4" "d4" "cc" "dc" "f4" "e4" "fc" "ec") (#$ . -3308))
#@88 Colors used by git-blame. The list is built once when activating git-blame
minor mode.
(defvar git-blame-colors nil (#$ . 3563))
#@39 *Color to be used for ancient commit.
(defvar git-blame-ancient-color "dark green" (#$ . -3698))
#@55 *Automatically update the blame display while editing
(defvar git-blame-autoupdate t (#$ . -3801))
#@31 The running git-blame process
(defvar git-blame-proc nil (#$ . 3906))
(make-variable-buffer-local 'git-blame-proc)
#@52 The git-blame overlays used in the current buffer.
(defvar git-blame-overlays nil (#$ . 4027))
(make-variable-buffer-local 'git-blame-overlays)
#@57 A cache of git-blame information for the current buffer
(defvar git-blame-cache nil (#$ . 4177))
(make-variable-buffer-local 'git-blame-cache)
#@38 An idle timer that updates the blame
(defvar git-blame-idle-timer nil (#$ . 4326))
(make-variable-buffer-local 'git-blame-cache)
#@28 A queue of update requests
(defvar git-blame-update-queue nil (#$ . 4461))
(byte-code "\301\302!\210\303B\304\303!\204\305\303\306\"\210\307B\304\307!\204\"\305\307\306\"\210\310B\304\310!\2041\305\310\306\"\210\301\310!\207" [current-load-list make-variable-buffer-local git-blame-update-queue git-blame-file default-boundp set-default nil git-blame-current git-blame-mode] 3)
#@62 String to display on the mode line when git-blame is active.
(defvar git-blame-mode-line-string " blame" (#$ . 4855))
(byte-code "\301\236\204\n\302B\301\207" [minor-mode-alist git-blame-mode (git-blame-mode git-blame-mode-line-string)] 2)
#@99 Toggle minor mode for displaying Git blame
With prefix ARG, turn the mode on if ARG is positive.
(defalias 'git-blame-mode #[(&optional arg) "\204 \203 \302 \207\303 \207\304!\305V\203\303 \207\302 \207" [arg git-blame-mode git-blame-mode-off git-blame-mode-on prefix-numeric-value 0] 2 (#$ . 5105) "P"])
#@62 Turn on git-blame mode.
See also function `git-blame-mode'.
(defalias 'git-blame-mode-on #[nil "\306\303!\210\203\307\310\311\312\313$\210\202\314\310\311\313#\210\315 \210\316\317\320 \"A\211\321=\203-\n\202/\f)\322\323\324\"\313\325 \207" [git-blame-autoupdate bgmode git-blame-dark-colors git-blame-colors git-blame-light-colors git-blame-cache make-local-variable add-hook after-change-functions git-blame-after-change nil t remove-hook git-blame-cleanup assoc background-mode frame-parameters dark make-hash-table :test equal git-blame-run git-blame-mode] 6 (#$ . 5424)])
#@63 Turn off git-blame mode.
See also function `git-blame-mode'.
(defalias 'git-blame-mode-off #[nil "\302 \210\203 \303!\210\304\211\207" [git-blame-idle-timer git-blame-mode git-blame-cleanup cancel-timer nil] 2 (#$ . 6021)])
#@57 Recalculate all blame information in the current buffer
(defalias 'git-reblame #[nil "\204\301\302!\210\303 \210\304 \207" [git-blame-mode error "Git-blame is not active" git-blame-cleanup git-blame-run] 2 (#$ . 6256) nil])
(defalias 'git-blame-run #[(&optional startline endline) "\203\306\307!\207p\310\311\312 P!\313\f\203\"\314 \315\316\317\f #D\"\314 \320!!C\"\321\322\323\n\324\325 &r\nq\210\326 \210\327\330!\210\327\331!\210 \332)\333\334\"\210\335\336\"\210\337ed#\210\340!+\207" [git-blame-proc args blame-buf display-buf startline endline message "Already running git blame" get-buffer-create " git blame for " buffer-name ("--incremental" "--contents" "-") append "-L" format "%d,%d" file-name-nondirectory apply start-process "git-blame" "git" "blame" erase-buffer make-local-variable git-blame-file git-blame-current nil set-process-filter git-blame-filter set-process-sentinel git-blame-sentinel process-send-region process-send-eof buffer-file-name] 7])
(defalias 'remove-git-blame-text-properties #[(start end) "\304 \305\306\n \307#\210\310 !*\207" [inhibit-read-only modified start end buffer-modified-p t remove-text-properties (point-entered nil) set-buffer-modified-p] 4])
#@29 Remove all blame properties
(defalias 'git-blame-cleanup #[nil "\301\302\"\210\303\304ed\"\207" [git-blame-overlays mapcar delete-overlay nil remove-git-blame-text-properties] 3 (#$ . 7482)])
#@50 Rerun blame to get updates between START and END
(defalias 'git-blame-update-region #[(start end) "\305 \"\n\2034\n\211A@\306 !W\203\306 !\307 ! V\203'\307 !\310 \f\"\311 !\210)\202)\312 \"\210\313\314e\"T\314e \"\"\207" [start end overlays overlay git-blame-overlays overlays-in overlay-start overlay-end delete delete-overlay remove-git-blame-text-properties git-blame-run count-lines] 5 (#$ . 7682)])
(defalias 'git-blame-sentinel #[(proc status) "r\304!q\210r q\210\305 \205\306 *\207" [proc git-blame-file git-blame-proc git-blame-update-queue process-buffer nil git-blame-delayed-update] 2])
(byte-code "\301B\302\301!\204\303\301\304\"\210\304\207" [current-load-list in-blame-filter default-boundp set-default nil] 3)
(defalias 'git-blame-filter #[(proc str) "\212\304!q\210\305!b\210\306 !\210\307b\210\n?\205(\310\211\211\205'\311 \211\204\312*)\207" [proc str in-blame-filter more process-buffer process-mark insert-before-markers 0 t git-blame-parse nil] 3])
(defalias 'git-blame-parse #[nil "\306\307!\203,\310\311!\312\310\313!!\312\310\314!!\312\310\315!!`\316\225|\210\317 !\n F,\320\207\306\321!\203j\310\311!\310\313!`\316\225|\210\322\f@ #\210\323\230\203g\324\f@\f\211AA)@\f\211AA)A@#\210\325*\320\207\325\207" [num-lines res-line src-line hash git-blame-current value looking-at "\\([0-9a-f]\\{40\\}\\) \\([0-9]+\\) \\([0-9]+\\) \\([0-9]+\\)\n" match-string 1 string-to-number 2 3 4 0 git-blame-new-commit t "\\([a-z-]+\\) \\(.+\\)\n" git-blame-add-info "filename" git-blame-create-overlay nil key x] 7])
(defalias 'git-blame-new-commit #[(hash) "rq\210\306 \n\"\2065 \203 \307 G!\234\310\f \"\f)\202!  \311 BD \312  \n#\210 *)\207" [git-blame-file hash git-blame-cache git-blame-colors e git-blame-ancient-color gethash random remove color puthash info] 4])
(defalias 'git-blame-create-overlay #[(info start-line num-lines) "\212q\210\306\211\307 !\210` y\210`\"\310\f\"\"#$@%\311%\312\313OB\314%B\315\316$\317\"B\320\316$\321\"B\322\316$\323\"B\324\316$\325\"B\326\316$\327\"B\257&#'B'\330#\331$#\210\330#\332\333(&\"#\210)\203\200\330#\334\335\336$A\236AD#\210\330#\337\340\333*&\"\334\341##.\207" [git-blame-file inhibit-modification-hooks inhibit-point-motion-hooks start-line start num-lines t goto-line make-overlay 104 0 6 72 97 git-blame-get-info author 65 author-mail 99 committer 67 committer-mail 115 summary overlay-put git-blame help-echo format-spec face :background color line-prefix propertize git-blame-prefix-face end ovl info hash spec git-blame-overlays git-blame-mouseover-format git-blame-use-colors git-blame-prefix-format] 10])
(defalias 'git-blame-add-info #[(info key value) "\303 !\nBC\244\207" [info key value intern] 3])
(defalias 'git-blame-get-info #[(info key) " A\236A\207" [key info] 2])
(defalias 'git-blame-current-commit #[nil "\301`\302\"\211\203@\202\303\304!)\207" [info get-char-property git-blame error "No commit info"] 4])
(defalias 'git-describe-commit #[(hash) "\303\304!rq\210\305\216\306\307\310\311\310\312\313\314 P\n&\210ed{+\207" [#1=#:temp-buffer git-blame-log-oneline-format hash generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [#1# buffer-name kill-buffer] 2)) call-process "git" nil t "log" "-1" "--pretty="] 9])
(byte-code "\301B\302\301!\204\303\301\304\"\210\305\301!\207" [current-load-list git-blame-last-identification default-boundp set-default nil make-variable-buffer-local] 3)
(defalias 'git-blame-identify #[(&optional hash) "\304\206\305 \"\211\205\n =?\205\306\307\310\n8\"\210\n\211)\207" [hash git-blame-cache info git-blame-last-identification gethash git-blame-current-commit message "%s" 4] 5 nil nil])
(defalias 'git-blame-after-change #[(start end length) "\205\303 \n\"\207" [git-blame-mode start end git-blame-enq-update] 3])
(byte-code "\301B\302\301!\204\303\301\304\"\210\305\301!\207" [current-load-list git-blame-last-update default-boundp set-default nil make-variable-buffer-local] 3)
#@63 Mark the region between START and END as needing blame update
(defalias 'git-blame-enq-update #[(start end) "\203 AU\203\n\241\210\202-\203$\n@U\203$ \240\210\202- \nB C\244\f\2062 ?\205=\306\307\310\311#\211\207" [git-blame-last-update start end git-blame-update-queue git-blame-proc git-blame-idle-timer run-with-idle-timer 0.5 nil git-blame-delayed-update] 4 (#$ . 11741)])
(defalias 'git-blame-delayed-update #[nil "\304 \205 \211A@\305\306 @ A\"*\207" [git-blame-idle-timer git-blame-update-queue inhibit-point-motion-hooks first nil t git-blame-update-region] 3])
(provide 'git-blame)
Jump to Line
Something went wrong with that request. Please try again.