summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/init-external.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/init-external.el b/lisp/init-external.el
index bc165aa..2b54173 100644
--- a/lisp/init-external.el
+++ b/lisp/init-external.el
@@ -70,6 +70,10 @@ is non-nil, switch to the buffer."
(setq diff-command "/bin/diff"
diff-switches "-u")
+(defadvice diff (after diff-select-and-view activate)
+ (select-window (get-buffer-window "*Diff*"))
+ (view-mode 1))
+
(define-key external-map "d" 'diff)
(define-key external-map "e" 'ediff)