Function: vc-git-dir-printer
vc-git-dir-printer is a byte-compiled function defined in
vc-git.el.gz.
Signature
(vc-git-dir-printer INFO)
Documentation
Pretty-printer for the vc-dir-fileinfo structure.
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc-git.el.gz
(defun vc-git-dir-printer (info)
"Pretty-printer for the vc-dir-fileinfo structure."
(let* ((isdir (vc-dir-fileinfo->directory info))
(state (if isdir "" (vc-dir-fileinfo->state info)))
(extra (vc-dir-fileinfo->extra info))
(old-perm (when extra (vc-git-extra-fileinfo->old-perm extra)))
(new-perm (when extra (vc-git-extra-fileinfo->new-perm extra))))
(insert
" "
(propertize (format "%c" (if (vc-dir-fileinfo->marked info) ?* ? ))
'face 'vc-dir-mark-indicator)
" "
(propertize
(format "%-12s" state)
'face (cond ((eq state 'up-to-date) 'vc-dir-status-up-to-date)
((memq state '(missing conflict)) 'vc-dir-status-warning)
((eq state 'ignored) 'vc-dir-status-ignored)
(t 'vc-dir-status-edited))
'mouse-face 'highlight
'keymap vc-dir-status-mouse-map)
" " (vc-git-permissions-as-string old-perm new-perm)
" "
(propertize (vc-git-escape-file-name (vc-dir-fileinfo->name info))
'face (if isdir 'vc-dir-directory
'vc-dir-file)
'help-echo
(if isdir
"Directory\nVC operations can be applied to it\nmouse-3: Pop-up menu"
"File\nmouse-3: Pop-up menu")
'keymap vc-dir-filename-mouse-map
'mouse-face 'highlight)
(vc-git-file-type-as-string old-perm new-perm)
(vc-git-rename-as-string state extra))))