emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

VC registered, but ignored


From: Eli Zaretskii
Subject: VC registered, but ignored
Date: Thu, 31 Aug 2023 18:24:40 +0300

In a repository where *.txt files are ignored, I added to VC a file
with the .txt extension, and was surprised to see the ':' indicator on
the mode line although the file was up-to-date.  Moreover, the tooltip
said the file was "locally modified".  That had me puzzled for a few
minutes, until I saw the code in vc-hooks.el.

So WDYT about the change below?

diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index e75165e..a4de0a6 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -87,6 +87,11 @@ vc-edited-state
   "Face for VC modeline state when the file is edited."
   :version "25.1")
 
+(defface vc-ignored-state
+  '((default :inherit vc-state-base))
+  "Face for VC modeline state when the file is registered, but ignored."
+  :version "30.1")
+
 ;; Customization Variables (the rest is in vc.el)
 
 (defcustom vc-ignore-dir-regexp
@@ -743,6 +748,10 @@ vc-default-mode-line-string
             (setq state-echo "File tracked by the VC system, but missing from 
the file system")
            (setq face 'vc-missing-state)
             (concat backend-name "?" rev))
+           ((eq state 'ignored)
+            (setq state-echo "File tracked by the VC system, but ignored")
+            (setq face 'vc-ignored-state)
+            (concat backend-name "!" rev))
           (t
            ;; Not just for the 'edited state, but also a fallback
            ;; for all other states.  Think about different symbols



reply via email to

[Prev in Thread] Current Thread [Next in Thread]