[Top][All Lists]

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

[elpa] master 167a2dd 1/6: Add diff-hl-dired-ignored-backends

From: Dmitry Gutov
Subject: [elpa] master 167a2dd 1/6: Add diff-hl-dired-ignored-backends
Date: Wed, 03 Feb 2016 23:03:36 +0000

branch: master
commit 167a2dd16bbf963773c9198b391921ce05324fc8
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Add diff-hl-dired-ignored-backends
    Fixes #62
 diff-hl-dired.el |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/diff-hl-dired.el b/diff-hl-dired.el
index 663d293..895341b 100644
--- a/diff-hl-dired.el
+++ b/diff-hl-dired.el
@@ -33,6 +33,7 @@
 (require 'diff-hl)
 (require 'dired)
+(require 'vc-hooks)
 (defvar diff-hl-dired-process-buffer nil)
@@ -62,9 +63,17 @@
 (defcustom diff-hl-dired-extra-indicators t
   "Non-nil to indicate ignored files."
-  :group 'diff-hl
   :type 'boolean)
+(defcustom diff-hl-dired-ignored-backends '(RCS)
+  "VC backends to ignore.
+The directories registered to one of these backends won't have
+status indicators."
+  :type `(repeat (choice ,@(mapcar
+                            (lambda (name)
+                              `(const :tag ,(symbol-name name) ,name))
+                            vc-handled-backends))))
 (define-minor-mode diff-hl-dired-mode
   "Toggle VC diff highlighting on the side of a Dired window."
@@ -83,7 +92,7 @@
         (def-dir default-directory)
         (buffer (current-buffer))
         dirs-alist files-alist)
-    (when backend
+    (when (and backend (not (memq backend diff-hl-dired-ignored-backends)))
       (if (buffer-live-p diff-hl-dired-process-buffer)
           (let ((proc (get-buffer-process diff-hl-dired-process-buffer)))

reply via email to

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