;;; diff-hl-dired.el --- Highlight changed files in Dired -*- lexical-binding: t -*-
-;; Copyright (C) 2012-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2015 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
(require 'diff-hl)
(require 'dired)
+(require 'vc-hooks)
(defvar diff-hl-dired-process-buffer nil)
(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))))
+
;;;###autoload
(define-minor-mode diff-hl-dired-mode
"Toggle VC diff highlighting on the side of a Dired window."
(def-dir default-directory)
(buffer (current-buffer))
dirs-alist files-alist)
- (when backend
+ (when (and backend (not (memq backend diff-hl-dired-ignored-backends)))
(diff-hl-dired-clear)
(if (buffer-live-p diff-hl-dired-process-buffer)
(let ((proc (get-buffer-process diff-hl-dired-process-buffer)))
(defalias 'diff-hl-dired-clear 'diff-hl-remove-overlays)
+;;;###autoload
(defun diff-hl-dired-mode-unless-remote ()
(unless (file-remote-p default-directory)
(diff-hl-dired-mode)))