Function: vc-jj-mode-line-string

vc-jj-mode-line-string is a natively compiled function defined in vc-jj.el.

Signature

(vc-jj-mode-line-string FILE)

Documentation

Return a mode line string and tooltip for FILE.

Source Code

;; Defined in /nix/store/j1ql1qsv99iszr5pqf5fk9yfcl5pq4nv-emacs-packages-deps/share/emacs/site-lisp/elpa/vc-jj-0.5/vc-jj.el
;;;; mode-line-string

(defun vc-jj-mode-line-string (file)
  "Return a mode line string and tooltip for FILE."
  (pcase-let* ((long-rev (vc-jj-working-revision file))
               (`(,short-rev ,description)
                (vc-jj--process-lines "log" "--no-graph" "-r" long-rev
                                      "-T" "self.change_id().shortest() ++ \"\\n\" ++ description.first_line() ++ \"\\n\""))
               (def-ml (vc-default-mode-line-string 'JJ file))
               (help-echo (get-text-property 0 'help-echo def-ml))
               (face   (get-text-property 0 'face def-ml)))
    ;; See docstring of `vc-default-mode-line-string' for a
    ;; description of the string prefix we extract here
    (propertize (concat (substring def-ml 0 3) short-rev)
                'face face
                'help-echo (concat help-echo
                                   "\nCurrent change: " long-rev
                                   " (" description ")"))))