aboutsummaryrefslogtreecommitdiffstats
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Tom Willemse2018-02-06 14:35:56 -0800
committerGravatar Tom Willemse2018-02-06 14:35:56 -0800
commit28af36faa3120dd97f24228334c97b3c29d61701 (patch)
tree50e66099ae523d2e299e6e4c79681d9a0044e154 /emacs
parentddcc955ab31df796b4d9a23bbd40e742418a85f0 (diff)
downloadnew-dotfiles-28af36faa3120dd97f24228334c97b3c29d61701.tar.gz
new-dotfiles-28af36faa3120dd97f24228334c97b3c29d61701.zip
Fix diff-hl for Perforce
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.org12
1 files changed, 12 insertions, 0 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index 8a313e2..156c28b 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -800,6 +800,18 @@ Computing Environment".
(global-diff-hl-mode)
#+END_SRC
+ Add p4 options for diff-hl to fix diff highlighting in Perforce projects.
+
+ #+BEGIN_SRC emacs-lisp
+ (defun oni:with-diff-hl-p4-args (orig-fun &rest args)
+ (let ((p4-lowlevel-diff-switches '("-du0")))
+ (apply orig-fun args)))
+
+ (with-eval-after-load 'vc-p4
+ (add-function :around (symbol-function 'diff-hl-changes-buffer)
+ #'oni:with-diff-hl-p4-args))
+ #+END_SRC
+
** Isearch
Replace the Isearch mode line lighter with a magnifying glass icon.