Merge: handle vc-display-status
being nil
This commit is contained in:
commit
5dfc7572dd
@ -49,8 +49,11 @@
|
|||||||
|
|
||||||
(defun mood-line-segment-vc--rev (vc-mode-str backend)
|
(defun mood-line-segment-vc--rev (vc-mode-str backend)
|
||||||
"Return name of current file's revision for BACKEND according to `vc-mode'.
|
"Return name of current file's revision for BACKEND according to `vc-mode'.
|
||||||
VC-MODE-STR is expected to be the value of `vc-mode' in the current buffer."
|
VC-MODE-STR is expected to be the value of `vc-mode' in the current buffer.
|
||||||
(or (pcase backend
|
If `vc-display-status' is nil, return the name of BACKEND."
|
||||||
|
(or (unless vc-display-status
|
||||||
|
(symbol-name backend))
|
||||||
|
(pcase backend
|
||||||
('Git (substring-no-properties vc-mode-str 5))
|
('Git (substring-no-properties vc-mode-str 5))
|
||||||
('Hg (substring-no-properties vc-mode-str 4)))
|
('Hg (substring-no-properties vc-mode-str 4)))
|
||||||
(ignore-errors
|
(ignore-errors
|
||||||
|
Loading…
Reference in New Issue
Block a user