;ELC ;;; Compiled by mockbuild@buildfarm04-new.corp.cloudlinux.com on Tue Jul 30 09:13:05 2024 ;;; from file /builddir/build/BUILD/git-1.8.3.1/contrib/emacs/git-blame.el ;;; in Emacs version 24.3.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\302\303\304\305\306\307%\210\310\307\311\312\306\313\314\315&\210\316\317\320\321\322\323\306\307&\210\316\324\325\326\306\307%\210\316\327\330\331\306\307%\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) custom-declare-variable git-blame-use-colors t "Use colors to indicate commits in `git-blame-mode'." :type boolean git-blame-prefix-format "%h %20A:" "The format of the prefix added to each line in `git-blame'\nmode. The format is passed to `format-spec' with the following format keys:\n\n %h - the abbreviated hash\n %H - the full hash\n %a - the author name\n %A - the author email\n %c - the committer name\n %C - the committer email\n %s - the commit summary\n" git-blame-mouseover-format "%h %a %A: %s" "The format of the description shown when pointing at a line in\n`git-blame' mode. The format string is passed to `format-spec'\nwith the following format keys:\n\n %h - the abbreviated hash\n %H - the full hash\n %a - the author name\n %A - the author email\n %c - the committer name\n %C - the committer email\n %s - the commit summary\n"] 8) #@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\203C @ \306\211\203; @ \306\211\2033 @\307\310\n\f $B A\211\204 * A\211\204* A\211\204\n*)\207" [result elements a --dolist-tail-- b c nil format "#%s%s%s"] 6 (#$ . 1998)]) #@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 (#$ . 2386)])) #@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" (#$ . -2643)) #@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") (#$ . -2919)) #@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") (#$ . -3172)) #@88 Colors used by git-blame. The list is built once when activating git-blame minor mode. (defvar git-blame-colors nil (#$ . 3427)) #@39 *Color to be used for ancient commit. (defvar git-blame-ancient-color "dark green" (#$ . -3562)) #@55 *Automatically update the blame display while editing (defvar git-blame-autoupdate t (#$ . -3665)) #@31 The running git-blame process (defvar git-blame-proc nil (#$ . 3770)) (make-variable-buffer-local 'git-blame-proc) #@52 The git-blame overlays used in the current buffer. (defvar git-blame-overlays nil (#$ . 3891)) (make-variable-buffer-local 'git-blame-overlays) #@57 A cache of git-blame information for the current buffer (defvar git-blame-cache nil (#$ . 4041)) (make-variable-buffer-local 'git-blame-cache) #@38 An idle timer that updates the blame (defvar git-blame-idle-timer nil (#$ . 4190)) (make-variable-buffer-local 'git-blame-cache) #@28 A queue of update requests (defvar git-blame-update-queue nil (#$ . 4325)) (make-variable-buffer-local 'git-blame-update-queue) (defvar git-blame-file nil) (defvar git-blame-current nil) (defvar git-blame-mode nil) (make-variable-buffer-local 'git-blame-mode) #@62 String to display on the mode line when git-blame is active. (defvar git-blame-mode-line-string " blame" (#$ . 4591)) (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 (#$ . 4841) "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 (#$ . 5160)]) #@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 (#$ . 5757)]) #@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 (#$ . 5992) 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 mapc delete-overlay nil remove-git-blame-text-properties] 3 (#$ . 7218)]) #@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 (#$ . 7416)]) (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]) (defvar in-blame-filter nil) (defalias 'git-blame-filter #[(proc str) "r\304!q\210\212\305!b\210\306 !\210eb\210\n?\205)\307\211\211\205(\310 \211\204 \311**\207" [proc str in-blame-filter more process-buffer process-mark insert-before-markers 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!\203b\310\311!\310\313!`\316\225|\210\322\f@ #\210\323\230\203_\324\f@\fAA@\fAAA@#\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] 6]) (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) "rq\210\212\306\211eb\210 Sy\210` y\210`!\307\f!\"\"#@$\310$\311\312OB\313$B\314\315#\316\"B\317\315#\320\"B\321\315#\322\"B\323\315#\324\"B\325\315#\326\"B\257%\"&B&\327\"\330##\210\327\"\331\332'%\"#\210(\203\204\327\"\333\334\335#A\236AD#\210\327\"\336\337\332)%\"\333\340##. \207" [git-blame-file inhibit-modification-hooks inhibit-point-motion-hooks start-line start num-lines t 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]) (defvar git-blame-last-identification nil) (make-variable-buffer-local 'git-blame-last-identification) (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]) (defvar git-blame-last-update nil) (make-variable-buffer-local 'git-blame-last-update) #@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 (#$ . 11192)]) (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)