branch: master commit 8dab38972461869d2b72088dc8473cca3ad650de Author: Dmitry Gutov <dgu...@yandex.ru> Commit: Dmitry Gutov <dgu...@yandex.ru>
Add separate set of faces for diff-hl-margin-mode Closes #87. --- diff-hl-margin.el | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/diff-hl-margin.el b/diff-hl-margin.el index e6d0b94..4ca2a7e 100644 --- a/diff-hl-margin.el +++ b/diff-hl-margin.el @@ -1,6 +1,6 @@ ;;; diff-hl-margin.el --- Highlight buffer changes on margins -*- lexical-binding: t -*- -;; Copyright (C) 2012-2015 Free Software Foundation, Inc. +;; Copyright (C) 2012-2017 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -44,6 +44,18 @@ "Highlight buffer changes on margin" :group 'diff-hl) +(defface diff-hl-margin-insert + '((default :inherit diff-hl-insert)) + "Face used to highlight inserted lines on the margin.") + +(defface diff-hl-margin-delete + '((default :inherit diff-hl-delete)) + "Face used to highlight deleted lines on the margin.") + +(defface diff-hl-margin-change + '((default :inherit diff-hl-change)) + "Face used to highlight changed lines on the margin.") + (defcustom diff-hl-margin-symbols-alist '((insert . "+") (delete . "-") (change . "!") (unknown . "?") (ignored . "i")) @@ -121,7 +133,7 @@ You probably shouldn't use this function directly." " " 'display `((margin ,(intern (format "%s-margin" side))) ,(propertize char 'face - (intern (format "diff-hl-%s" type))))))))) + (intern (format "diff-hl-margin-%s" type))))))))) (defun diff-hl-highlight-on-margin (ovl type _shape) (let ((spec (cdr (assoc (cons type diff-hl-side)